|
1 | 1 | declare module 'component' { |
2 | | - import * as React from 'react'; |
3 | | - |
4 | | - import Message from './path/to/Message'; |
5 | | - |
6 | | - export type ComponentOptionalEnum = 'News' | 'Photos' | 1 | 2; |
7 | | - |
8 | | - export type ComponentOptionalUnion = string | number; |
9 | | - |
10 | | - export interface ComponentOptionalObjectWithShape { |
11 | | - color?: string; |
12 | | - fontSize?: number; |
13 | | - } |
14 | | - |
15 | | - export type ComponentRequiredUnion = any[] | boolean; |
16 | | - |
17 | | - export interface ComponentProps { |
18 | | - /** |
19 | | - * This is a jsdoc comment for optionalAny. |
20 | | - */ |
21 | | - optionalAny?: any; |
22 | | - optionalArray?: any[]; |
23 | | - optionalBool?: boolean; |
24 | | - optionalFunc?: (...args: any[])=>any; |
25 | | - optionalNumber?: number; |
26 | | - optionalObject?: Object; |
27 | | - optionalString?: string; |
28 | | - optionalNode?: React.ReactNode; |
29 | | - optionalElement?: React.ReactElement<any>; |
30 | | - optionalMessage?: typeof Message; |
31 | | - optionalEnum?: ComponentOptionalEnum; |
32 | | - optionalUnion?: ComponentOptionalUnion; |
33 | | - optionalArrayOf?: number[]; |
34 | | - optionalObjectWithShape?: ComponentOptionalObjectWithShape; |
35 | | - requiredFunc: (...args: any[])=>any; |
36 | | - requiredAny: any; |
37 | | - requiredUnion: ComponentRequiredUnion; |
38 | | - requiredArrayOf: string[]; |
39 | | - requiredArrayOfObjectsWithShape: { |
40 | | - color?: string; |
41 | | - fontSize?: number; |
42 | | - }[]; |
43 | | - requiredSymbol: typeof Symbol; |
44 | | - } |
45 | | - |
46 | | - export class Component extends React.Component<ComponentProps, any> { |
47 | | - } |
48 | | - |
| 2 | + import * as React from 'react'; |
| 3 | + |
| 4 | + import Message from './path/to/Message'; |
| 5 | + |
| 6 | + export type ComponentOptionalEnum = 'News' | 'Photos' | 1 | 2; |
| 7 | + |
| 8 | + export type ComponentOptionalUnion = string | number; |
| 9 | + |
| 10 | + export interface ComponentOptionalObjectWithShape { |
| 11 | + color?: string; |
| 12 | + fontSize?: number; |
| 13 | + } |
| 14 | + |
| 15 | + export type ComponentRequiredUnion = any[] | boolean; |
| 16 | + |
| 17 | + export interface ComponentProps { |
| 18 | + /** |
| 19 | + * This is a jsdoc comment for optionalAny. |
| 20 | + */ |
| 21 | + optionalAny?: any; |
| 22 | + optionalArray?: any[]; |
| 23 | + optionalBool?: boolean; |
| 24 | + optionalFunc?: (...args: any[]) => any; |
| 25 | + optionalNumber?: number; |
| 26 | + optionalObject?: Object; |
| 27 | + optionalString?: string; |
| 28 | + optionalNode?: React.ReactNode; |
| 29 | + optionalElement?: React.ReactElement<any>; |
| 30 | + optionalMessage?: typeof Message; |
| 31 | + optionalEnum?: ComponentOptionalEnum; |
| 32 | + optionalUnion?: ComponentOptionalUnion; |
| 33 | + optionalArrayOf?: number[]; |
| 34 | + optionalObjectWithShape?: ComponentOptionalObjectWithShape; |
| 35 | + requiredFunc: (...args: any[]) => any; |
| 36 | + requiredAny: any; |
| 37 | + requiredUnion: ComponentRequiredUnion; |
| 38 | + requiredArrayOf: string[]; |
| 39 | + requiredArrayOfObjectsWithShape: { |
| 40 | + color?: string; |
| 41 | + fontSize?: number; |
| 42 | + }[]; |
| 43 | + requiredSymbol: typeof Symbol; |
| 44 | + } |
| 45 | + |
| 46 | + export class Component extends React.Component<ComponentProps, any> { |
| 47 | + } |
49 | 48 | } |
50 | | - |
0 commit comments