File tree 1 file changed +7
-2
lines changed
docs/basic/getting-started
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,10 @@ type AppProps = {
12
12
names: string [];
13
13
/** string literals to specify exact string values, with a union type to join them together */
14
14
status: " waiting" | " success" ;
15
- /** any object as long as you dont use its properties (not common ) */
15
+ /** any object as long as you dont use its properties (NOT COMMON but useful as placeholder ) */
16
16
obj: object ;
17
17
obj2: {}; // almost the same as `object`, exactly the same as `Object`
18
- /** an object with defined properties (preferred ) */
18
+ /** an object with any number of properties (PREFERRED ) */
19
19
obj3: {
20
20
id: string ;
21
21
title: string ;
@@ -25,6 +25,11 @@ type AppProps = {
25
25
id: string ;
26
26
title: string ;
27
27
}[];
28
+ /** a dict object with any number of properties of the same type */
29
+ dict1: {
30
+ [key : string ]: MyTypeHere ;
31
+ };
32
+ dict2: Record <string , MyTypeHere >; // equivalent to dict1
28
33
/** any function as long as you don't invoke it (not recommended) */
29
34
onSomething: Function ;
30
35
/** function that doesn't take or return anything (VERY COMMON) */
You can’t perform that action at this time.
0 commit comments