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
Support for typescript definitions #200
Comments
Will do. Thanks. 🥂 |
If you are okay, without any objections from @wallymathieu, I can import existing ones for quick resolution in a PR. I am sort of blocked because of them. As is I have created a PR DefinitelyTyped/DefinitelyTyped#34084 for 782540c. Would be easier for any new consumer to get going. |
Are there named parameters in typescript nowadays? |
@GaikwadPratik a PR from existing definitions would be much appreciated if @wallymathieu agrees. I can then just package the types with the library. |
I think it makes more sense to have the types in the package. If you could look at the PR to tell me if it's ok? I'm away from computers for a few days so won't be able to verify the PR. |
We need to add an interface XMLWriter {
[x: string]: ((e: XMLElementOrXMLNode, options: WriterOptions, level?: number) => void);
} where interface WriterOptions {
pretty?: boolean;
indent?: string;
newline?: string;
offset?: number;
allowEmpty?: boolean;
dontPrettyTextNodes?: boolean;
spaceBeforeSlash?: string | boolean;
user? :any;
state?: WriterState;
} and enum WriterState {
None = 0,
OpenTag = 1,
InsideTag = 2,
CloseTag = 3
} If you're in a hurry you can just add This should make the types mostly compatible with the current release, I can add the rest of the changes on top of this PR. |
Perfect thank you. |
Why don't you add typescript definitions in the package? I mean there is one created https://www.npmjs.com/package/@types/xmlbuilder by @wallymathieu. But those are not updated for quiet a long time. It would be easier to maintain them in the project.
The text was updated successfully, but these errors were encountered: