-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add TypeScript declarations to marked-element #88
Add TypeScript declarations to marked-element #88
Conversation
18d8ade
to
8793743
Compare
Thanks for the PR! I don't see the actual typings in the commit, do you need to When I tried this element earlier, it wasn't compiling. One problem (hopefully the only one) was that there is no To test if things compile, you need to FYI all of the elements that don't currently have a PR out for them are because they aren't yet compiling. They probably all just need a few little tweaks like this (or depend on ones that do), and I haven't quite had the time yet to go through them. paper-behaviors (already has a PR, but not compiling so I haven't merged yet -- PolymerElements/paper-behaviors#85) and paper-input would be the ideal next ones to tackle if you're interested in helping out, because they have the most dependencies. |
@aomarks Thank you so much for the help in how to test it. It seems like it is compiling now with these changes. I did notice that the tool doesn't run on windows. I will file an issue. I went ahead and added just some basic Without the ignore of |
Sounds good.
Great.
Replied on the commit. |
gen-tsd.json
Outdated
@@ -0,0 +1,10 @@ | |||
{ | |||
"excludeFiles": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the default set of excluded files, so you can omit it (https://github.com/Polymer/gen-typescript-declarations/blob/master/src/gen-ts.ts#L66)
.travis.yml
Outdated
install: | ||
- npm install -g polymer-cli | ||
- npm install -g polymer-cli bower |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be neccessary -- bower is a devDependency from the package.json.
marked-element.html
Outdated
@@ -372,6 +380,7 @@ | |||
/** | |||
* Fired when an error is received while fetching remote markdown content. | |||
* | |||
* @param {Event} e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!Event
(object types in Closure are nullable by default)
marked-element.html
Outdated
@@ -381,6 +390,9 @@ | |||
} | |||
}, | |||
|
|||
/** | |||
* @param {MutationRecord} mutation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see mutation[0]
right below, so maybe this is supposed to be an array? In which case (again because of default nullability) it should be !Array<!MutationRecord>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shoot! Yes, I mean to do that!
marked-element.html
Outdated
@@ -253,7 +253,8 @@ | |||
/** | |||
* Unindents the markdown source that will be rendered. | |||
* | |||
* @param {string} text | |||
* @param {!string} text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't actually need it for primitives like string
, they are already non-null by default. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL 👍
install: | ||
- npm install -g polymer-cli | ||
- npm install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this? Travis automatically runs it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't automatically run this when it is in the install
section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see. Our Travis files seem inconsistent, some of the other ones don't use the install section at all.
https://github.com/PolymerElements/iron-behaviors/blob/master/.travis.yml
Oh well, fine.
Released as v2.4.0 -- thanks again for the PR! |
This PR adds TypeScript declarations generated by https://github.com/Polymer/gen-typescript-declarations/
These declarations can be re-generated by running
npm run update-types
.Tracker: https://github.com/Polymer/gen-typescript-declarations/issues/79
Noticed this one wasn't listed on the tracking issue. Figured I would get it started.
Keep running out of memory on my work PC, will try generating when I get home.