mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-05-31 16:40:02 +00:00
* Use Typescript 3.7 assertions for invariant() https://devblogs.microsoft.com/typescript/announcing-typescript-3-7/#assertion-functions * support <3.7 with typesVersions
20 lines
628 B
TypeScript
20 lines
628 B
TypeScript
// Type definitions for invariant 2.2.0
|
|
// Project: https://github.com/zertosh/invariant
|
|
// Definitions by: MichaelBennett <https://github.com/bennett000>
|
|
// dtinth <https://github.com/dtinth>
|
|
// Turadg Aleahmad <https://github.com/turadg>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
declare let invariant:invariant.InvariantStatic;
|
|
|
|
export = invariant;
|
|
export as namespace invariant;
|
|
|
|
declare namespace invariant {
|
|
interface InvariantStatic {
|
|
(testValue:false, format?:string, ...extra:any[]):never;
|
|
(testValue:any, format?:string, ...extra:any[]):void;
|
|
}
|
|
}
|
|
|