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

fix(types): align type definitions with docs #956

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

Enet4
Copy link
Contributor

@Enet4 Enet4 commented Oct 2, 2023

Description

This PR changes index.d.ts so that:

  • The documentation about the various options from index.js are also available through the type definitions;
  • Platform-specific app options are also encoded in the types, with type conditionals so that they match the platform selected;
  • Optional fields are marked as such, thus preventing errors when they are missing.

- Add definitions for app options
   - with type conditionals so that they match the platform selected
- copy documentation over from index.js
@ayushmanchhabra
Copy link
Collaborator

@Enet4 Thanks a ton! I've been thinking of adding in depth type definitions but never got around to it. I'll look into this soon!

@ayushmanchhabra ayushmanchhabra changed the title Extend and improve TypeScript type definitions fix(types): align type definitions with docs Oct 3, 2023
@ayushmanchhabra ayushmanchhabra merged commit 3b3ac27 into nwutils:main Oct 3, 2023
9 checks passed
@Enet4 Enet4 deleted the imp/d.ts branch October 3, 2023 20:17
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.

2 participants