-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
28 additions
and
21 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
packages/nimble-components/src/global-type-extensions.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// This file has modifications to global types used for nimble-components builds: | ||
// - The types file should not be in the build output | ||
// - You should not see a file with these types created in the dist build | ||
// - Type additions added to this file should not appear in any public API definitions | ||
// - The fields added to global types should not be observable in any built .d.ts file by TypeScript. To verify you can do a text search of generated .d.ts files in the dist folder for the fields being added and verify they are not associated with the augmented types. | ||
// - This file should only impact the nimble-components library build and not users of nimble-components. Any type changes that impact clients should not be placed here. | ||
|
||
/** | ||
* This is a workaround for an incomplete definition of the native dialog element. Remove when using Typescript >=4.8.3. | ||
* https://github.com/microsoft/TypeScript/issues/48267 | ||
* @internal | ||
*/ | ||
interface HTMLDialogElement { | ||
showModal(): void; | ||
close(returnValue?: string): void; | ||
} | ||
|
||
declare namespace Intl { | ||
// roundingPriority has been supported by browsers since 8/23, but TypeScript still hasn't | ||
// added it to the type definition. See https://github.com/microsoft/TypeScript/issues/56269 | ||
interface NumberFormatOptions { | ||
roundingPriority?: | ||
| 'auto' | ||
| 'morePrecision' | ||
| 'lessPrecision' | ||
| undefined; | ||
} | ||
} |
21 changes: 0 additions & 21 deletions
21
packages/nimble-components/src/utilities/type-extensions.d.ts
This file was deleted.
Oops, something went wrong.