Skip to content

Commit

Permalink
Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
m-akinc committed Feb 26, 2024
1 parent 851470e commit f4392fe
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 21 deletions.
28 changes: 28 additions & 0 deletions packages/nimble-components/src/global-type-extensions.d.ts
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 packages/nimble-components/src/utilities/type-extensions.d.ts

This file was deleted.

0 comments on commit f4392fe

Please sign in to comment.