|
| 1 | +/// <reference types="jest" /> |
| 2 | +/// <reference types="node" /> |
| 3 | +/// <reference types="react" /> |
| 4 | +/// <reference types="react-dom" /> |
| 5 | +/// <reference types="@testing-library/jest-dom" /> |
| 6 | + |
| 7 | +declare module '*.css'; |
| 8 | +declare module '*.less'; |
| 9 | +declare module 'jsonp'; |
| 10 | + |
| 11 | +declare namespace JSX { |
| 12 | + type Element = React.JSX.Element; |
| 13 | + interface ElementClass extends React.JSX.ElementClass {} |
| 14 | + interface ElementAttributesProperty |
| 15 | + extends React.JSX.ElementAttributesProperty {} |
| 16 | + interface ElementChildrenAttribute |
| 17 | + extends React.JSX.ElementChildrenAttribute {} |
| 18 | + type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes< |
| 19 | + C, |
| 20 | + P |
| 21 | + >; |
| 22 | + interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {} |
| 23 | + interface IntrinsicClassAttributes<T> extends React.JSX |
| 24 | + .IntrinsicClassAttributes<T> {} |
| 25 | + interface IntrinsicElements extends React.JSX.IntrinsicElements {} |
| 26 | +} |
| 27 | + |
| 28 | +declare namespace jest { |
| 29 | + interface Matchers<R> { |
| 30 | + lastCalledWith(...expected: unknown[]): R; |
| 31 | + nthCalledWith(nthCall: number, ...expected: unknown[]): R; |
| 32 | + toBeCalled(): R; |
| 33 | + toBeCalledTimes(expected: number): R; |
| 34 | + toBeCalledWith(...expected: unknown[]): R; |
| 35 | + } |
| 36 | +} |
| 37 | + |
| 38 | +declare const vi: { |
| 39 | + fn: <T extends (...args: any[]) => any = (...args: any[]) => any>( |
| 40 | + implementation?: T, |
| 41 | + ) => jest.MockedFunction<T>; |
| 42 | + mock: ( |
| 43 | + moduleName: string, |
| 44 | + factory?: (importOriginal: <T>() => Promise<T>) => unknown, |
| 45 | + ) => void; |
| 46 | + spyOn: typeof jest.spyOn; |
| 47 | + useFakeTimers: () => void; |
| 48 | + useRealTimers: () => void; |
| 49 | + advanceTimersByTime: (msToRun: number) => void; |
| 50 | + clearAllTimers: () => void; |
| 51 | + runAllTimers: () => void; |
| 52 | + importActual: <T>(moduleName: string) => Promise<T>; |
| 53 | + clearAllMocks: () => void; |
| 54 | + resetAllMocks: () => void; |
| 55 | + restoreAllMocks: () => void; |
| 56 | +}; |
| 57 | + |
| 58 | +declare const describe: any; |
| 59 | +declare const it: any; |
| 60 | +declare const test: any; |
| 61 | +declare const beforeEach: any; |
| 62 | +declare const afterEach: any; |
| 63 | +declare const beforeAll: any; |
| 64 | +declare const afterAll: any; |
| 65 | +declare const expect: any; |
| 66 | + |
| 67 | +declare module 'moment/locale/zh-cn'; |
0 commit comments