Giter Club home page Giter Club logo

Comments (10)

Simn avatar Simn commented on May 29, 2024

There's nothing Dox can do to distinguish this with what the compiler currently outputs.

from dox.

Gama11 avatar Gama11 commented on May 29, 2024

Maybe my other issue over at the haxe repo shouldn't have been closed then?

from dox.

Simn avatar Simn commented on May 29, 2024

There's nothing we can do about that either. The concept of non-nullable optional basic types only makes sense on the Flash target anyway. All other targets require the type to be nullable in order to implement the optional/default value behavior.

from dox.

Gama11 avatar Gama11 commented on May 29, 2024

Last time I checked, the following gives a compiler error on all static targets:

defaultValue(null);

private function defaultValue(value:Int = 0)
{
    trace(value);
}

On static platforms, null can't be used as basic type Int

So it doesn't seem accurate that this only makes sense on flash? What happens internally to make this happen doesn't really matter to the dev using the API, you simply can't pass null.

from dox.

Simn avatar Simn commented on May 29, 2024

Maybe Dox could just always omit the ? if there's a default value. I guess the type itself should indicate nullability.

from dox.

Gama11 avatar Gama11 commented on May 29, 2024

I think that would be a good solution.

from dox.

Gama11 avatar Gama11 commented on May 29, 2024

Are you sure this is working correctly?

(left - generated API docs, right - actual code)

The API docs here shouldn't have a ? here for recursive.

from dox.

Simn avatar Simn commented on May 29, 2024

Is that the Flambe theme? It's very possible this has to be fixed for it specifically because the original fix was template-based. Try applying it to the appropriate flambe template.

from dox.

Gama11 avatar Gama11 commented on May 29, 2024

Ah, I didn't realize the fix was part of the theme. Thanks, I'll try that.

from dox.

Gama11 avatar Gama11 commented on May 29, 2024

Yeah, that did it. PR here: #97

from dox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.