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

docs: Note the new TS option for throwOnInvalid. #1415

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CarsonF
Copy link

@CarsonF CarsonF commented Apr 3, 2023

I am adding support for the invalid return types in the TypeScript definitions.
DefinitelyTyped/DefinitelyTyped#64995
With this I added a way to opt-in to the stricter types when throwOnInvalid is enabled.
I'm documenting this here for users, since we don't really have another documentation place.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Apr 3, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: CarsonF / name: Carson Full (84eb1c6)

Copy link

@pvogel1967 pvogel1967 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doc is inadequate. Should be clear this should be in a local types/luxon/index.d.ts file and it should import { TSSettings } from 'luxon' to ensure the module declare here is merged with the main types module from DefinitelyTyped.

@CarsonF
Copy link
Author

CarsonF commented Nov 16, 2023

This doc is inadequate. Should be clear this should be in a local types/luxon/index.d.ts file and it should import { TSSettings } from 'luxon' to ensure the module declare here is merged with the main types module from DefinitelyTyped.

No this does not have to be in a locally configured "types" folder. It should be done in the same spot as you enable the runtime setting, as I thought the doc change communicated by being right under that runtime setting. That setting has to be executed early on in your application, and doing so means TS picks it up and includes it (merges the interface correctly).

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.

None yet

2 participants