7
declare interface BooleanInterfaceDTS {
11
declare interface NumberInterfaceDTS {
15
declare interface StringInterfaceDTS {
19
declare interface UnionInterfaceDTS {
21
unionProp: number | boolean
24
declare interface UnionOptionalInterfaceDTS {
26
unionProp: string | undefined
29
declare interface TupleInterfaceDTS {
31
tuple: [number, boolean]
34
declare interface OptionInterfaceDTS {
36
tuple: [boolean?, number?]
39
declare class ClassDTS extends CommonMethod<ClassDTS> {
41
testUnionOptional(value: UnionOptionalInterfaceDTS)
43
testArray(value: Array<number>)
53
// type | undefined // undefined
54
// type1 | type2 // union
56
// [type1, type2] // tuple
57
// [type1?, type2?] // tuple optional
58
// [type1 | type2, (type3 | type 4)?] // tuple union
59
declare class TestAttribute extends CommonMethod<TestAttribute> {
62
testBoolean(value: boolean): TestAttribute;
64
testNumber(value: number): TestAttribute;
66
testString(value: string): TestAttribute;
68
testEnum(value: EnumDTS): TestAttribute
70
testFunction(value: (a: number) => boolean): TestAttribute;
72
testBasicMix(v1: number, v2: string, v3: number): TestAttribute
76
testBooleanUndefined(value: boolean | undefined): TestAttribute;
78
testNumberUndefined(value: number | undefined): TestAttribute;
80
testStringUndefined(value: string | undefined): TestAttribute;
82
testEnumUndefined(value: EnumDTS | undefined): TestAttribute;
84
testFunctionUndefined(value: (a: number) => boolean | undefined): TestAttribute;
88
testUnionNumberEnum(val: number | EnumDTS): TestAttribute
90
testUnionBooleanString(val: boolean | string): TestAttribute
92
testUnionStringNumber(val: string | number): TestAttribute
94
testUnionBooleanStringNumberUndefined(val: boolean | string | number | undefined): TestAttribute
98
testBooleanArray(value: boolean[]): TestAttribute;
100
testNumberArray(value: number[]): TestAttribute;
102
testStringArray(value: string[]): TestAttribute;
104
testEnumArray(value: EnumDTS[]): TestAttribute
106
// TBD: array of functions
107
// testFunctionArray(value: ((a: number) => boolean)[]): TestAttribute;
109
testArrayMix(v1: number[], v2: string[], v3: EnumDTS[]): TestAttribute;
111
// TBD: array of functions
112
//testArrayMix(v1: number[], v2: string[], v3: EnumDTS[], v4: ((a: number) => string)[]): TestAttribute;
116
testTuple(value: [boolean, number]): TestAttribute;
118
testTuple(value: [number, string, EnumDTS]): TestAttribute;
122
testTupleOptional(value: [number, string?, boolean?, EnumDTS?]): TestAttribute;
126
testTupleUnion(value: [(number | string), (boolean | EnumDTS), (string | EnumDTS | boolean)?]): TestAttribute;
130
testBooleanInterface(value: BooleanInterfaceDTS): Attribute
132
testNumberInterface(value: NumberInterfaceDTS): Attribute
134
testStringInterface(value: StringInterfaceDTS)
136
testUnionInterface(value: UnionInterfaceDTS)
138
testUnionOptional(value: UnionOptionalInterfaceDTS)
140
testTupleInterface(value: TupleInterfaceDTS)
142
testOptionInterface(value: OptionInterfaceDTS)
144
testInterfaceMixed(v1: UnionInterfaceDTS, v2: number, v3: TupleInterfaceDTS)