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

typings are full of errors #211

Closed
sandersn opened this issue May 8, 2019 · 2 comments · Fixed by #212
Closed

typings are full of errors #211

sandersn opened this issue May 8, 2019 · 2 comments · Fixed by #212
Labels

Comments

@sandersn
Copy link
Contributor

sandersn commented May 8, 2019

Discovered in Definitely Typed: the plist typings depend on xmlbuilder. However, any Typescript code (or checked Javascript code) that depends on xmlbuilder will now have these errors. I'd recommend adding a call to tsc typings/index.d.ts to the CI run somewhere.

  1. The import syntax for 'stream' should be import { Writable } from 'stream';.
  2. abstract class XMLCharacterData seems to be referred to as CharacterData in the rest of the file.
  3. XMLDocType incorrectly extends XMLNode — you can't return a subtype in an override, and many methods do this.

(1) and (2) have easy, obvious fixes. (3) I'm not so sure about -- probably XMLNode just needs to return this. Either way, I'll have a PR up shortly.

@sandersn
Copy link
Contributor Author

sandersn commented May 8, 2019

(2) might be intending to extend the built-in CharacterData but I think this is really unlikely.

@sandersn
Copy link
Contributor Author

sandersn commented May 8, 2019

I think for (3), the base class, XMLNode, needs to have its methods return XMLNode.

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

Successfully merging a pull request may close this issue.

2 participants