Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ArgsRenderer.hx. First optional argument wasn't rendered as optional in TS. #35

Merged
merged 1 commit into from
Feb 21, 2020

Conversation

mrEuler
Copy link
Contributor

@mrEuler mrEuler commented Feb 21, 2020

Here is an example of how it worked before:

Haxe:

class Vec3 {
    public inline function new(x:Float = 0, y:Float = 0, z:Float = 0) {
         ...
    }
}

TypeScript Declarations:

export class Vec3 {
    constructor(x: number, y?: number, z?: number);
}

After this fix ts declarations will look like:
TypeScript Declarations:

export class Vec3 {
    constructor(x?: number, y?: number, z?: number);
}

@elsassph elsassph merged commit 67c50d2 into elsassph:master Feb 21, 2020
@elsassph
Copy link
Owner

Silly mistake...

@mrEuler
Copy link
Contributor Author

mrEuler commented Feb 21, 2020

I would also add some tests for functions because there were no tests for such situation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants