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

how to support var fillColor : Null<Color|String>;? #35

Closed
sonygod opened this issue May 31, 2020 · 2 comments
Closed

how to support var fillColor : Null<Color|String>;? #35

sonygod opened this issue May 31, 2020 · 2 comments

Comments

@sonygod
Copy link

sonygod commented May 31, 2020

how to support var fillColor : Null<Color|String>;?

from paper.js

path.fillColor=new Color(...);

or

path.fillColor="red"
@haxiomic
Copy link
Owner

This should work, it should use ts.AnyOf2<>, what does the converted haxe code look like?

@haxiomic
Copy link
Owner

haxiomic commented May 31, 2020

This is a problem with the types of paper.js,

Checking paper.d.ts in node_modules/paper after npm install paper:

        /** 
         * The fill color.
         */
        fillColor: Color | null

Which is correctly translated to

	/**
		The fill color.
	**/
	var fillColor : Null<Color>;

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

No branches or pull requests

2 participants