Skip to content

Commit 84ad9ed

Browse files
committed
add incremental outDir ts_out
1 parent 9478c45 commit 84ad9ed

File tree

5 files changed

+123
-117
lines changed

5 files changed

+123
-117
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ Signum.React/node_modules/*.js
4040
/Signum.TSGenerator/Binaries/*
4141
/Signum.React/node_modules/@types/react/node_modules*
4242
/Signum.React/node_modules/**/*.md
43+
/Signum.React/ts_out/*

Signum.React/Scripts/Globals.d.ts

Lines changed: 0 additions & 115 deletions
This file was deleted.

Signum.React/Scripts/Globals.ts

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,121 @@
1+
declare global {
12

3+
function require<T>(path: string): T;
4+
function require<T>(paths: string[], callback: (...modules: any[]) => void): void;
5+
6+
interface Promise<T> {
7+
done(this: Promise<T>): void;
8+
}
9+
10+
interface Window {
11+
__baseUrl: string;
12+
dataForChildWindow?: any;
13+
}
14+
15+
interface Array<T> {
16+
groupBy<K extends string | number>(this: Array<T>, keySelector: (element: T) => K): { key: K; elements: T[] }[];
17+
groupToObject(this: Array<T>, keySelector: (element: T) => string): { [key: string]: T[] };
18+
groupWhen(this: Array<T>, condition: (element: T) => boolean): { key: T, elements: T[] }[];
19+
groupWhenChange<K extends string | number>(this: Array<T>, keySelector: (element: T) => K): { key: K, elements: T[] }[];
20+
21+
orderBy<V>(this: Array<T>, keySelector: (element: T) => V): T[];
22+
orderByDescending<V>(this: Array<T>, keySelector: (element: T) => V): T[];
23+
24+
25+
toObject(this: Array<T>, keySelector: (element: T) => string): { [key: string]: T };
26+
toObject<V>(this: Array<T>, keySelector: (element: T) => string, valueSelector: (element: T) => V): { [key: string]: V };
27+
toObjectDistinct(this: Array<T>, keySelector: (element: T) => string): { [key: string]: T };
28+
toObjectDistinct<V>(this: Array<T>, keySelector: (element: T) => string, valueSelector: (element: T) => V): { [key: string]: V };
29+
distinctBy(this: Array<T>, keySelector?: (element: T) => string): T[];
30+
31+
flatMap<R>(this: Array<T>, selector: (element: T, index: number, array: T[]) => R[]): R[];
32+
33+
clear(this: Array<T>): void;
34+
groupsOf(this: Array<T>, groupSize: number, elementSize?: (item: T) => number): T[][];
35+
36+
withMin<V>(this: Array<T>, keySelector: (element: T) => V): T | undefined;
37+
withMax<V>(this: Array<T>, keySelector: (element: T) => V): T | undefined;
38+
max(this: Array<number | null | undefined>): number | null;
39+
max(this: Array<T>, selector: (element: T, index: number, array: T[]) => number | null | undefined): number | null;
40+
min(this: Array<number | null | undefined>): number | null;
41+
min(this: Array<T>, selector: (element: T, index: number, array: T[]) => number | null | undefined): number | null;
42+
43+
sum(this: Array<number>): number;
44+
sum(this: Array<T>, selector: (element: T, index: number, array: T[]) => number): number;
45+
46+
first(this: Array<T>, errorContext?: string): T;
47+
first(this: Array<T>, predicate?: (element: T, index: number, array: T[]) => boolean): T;
48+
49+
firstOrNull(this: Array<T>): T | null;
50+
firstOrNull(this: Array<T>, predicate?: (element: T, index: number, array: T[]) => boolean): T | null;
51+
52+
last(this: Array<T>, errorContext?: string): T;
53+
last(this: Array<T>, predicate?: (element: T, index: number, array: T[]) => boolean): T;
54+
55+
lastOrNull(this: Array<T>, ): T | null;
56+
lastOrNull(this: Array<T>, predicate?: (element: T, index: number, array: T[]) => boolean): T | null;
57+
58+
single(this: Array<T>, errorContext?: string): T;
59+
single(this: Array<T>, predicate?: (element: T, index: number, array: T[]) => boolean): T;
60+
61+
singleOrNull(this: Array<T>, errorContext?: string): T | null;
62+
singleOrNull(this: Array<T>, predicate?: (element: T, index: number, array: T[]) => boolean): T | null;
63+
64+
contains(this: Array<T>, element: T): boolean;
65+
remove(this: Array<T>, element: T): boolean;
66+
removeAt(this: Array<T>, index: number): void;
67+
moveUp(this: Array<T>, index: number): number;
68+
moveDown(this: Array<T>, index: number): number;
69+
insertAt(this: Array<T>, index: number, element: T): void;
70+
71+
notNull(this: Array<T>): NonNullable<T>[];
72+
clone(this: Array<T>, ): T[];
73+
joinComma(this: Array<T>, lastSeparator: string): string;
74+
extract(this: Array<T>, filter: (element: T) => boolean): T[];
75+
findIndex(this: Array<T>, filter: (element: T, index: number, obj: Array<T>) => boolean): number;
76+
findLastIndex(this: Array<T>, filter: (element: T) => boolean): number;
77+
}
78+
79+
interface ArrayConstructor {
80+
81+
range(min: number, maxNotIncluded: number): number[];
82+
toArray<T>(arrayish: { length: number;[index: number]: T }): T[];
83+
repeat<T>(count: number, value: T): T[];
84+
}
85+
86+
interface String {
87+
contains(this: string, str: string): boolean;
88+
startsWith(this: string, str: string): boolean;
89+
endsWith(this: string, str: string): boolean;
90+
formatWith(this: string, ...parameters: any[]): string;
91+
forGenderAndNumber(this: string, number: number): string;
92+
forGenderAndNumber(this: string, gender: string | undefined): string;
93+
forGenderAndNumber(this: string, gender: any, number?: number): string;
94+
replaceAll(this: string, from: string, to: string): string;
95+
indent(this: string, numChars: number): string;
96+
after(this: string, separator: string): string;
97+
before(this: string, separator: string): string;
98+
tryAfter(this: string, separator: string): string | undefined;
99+
tryBefore(this: string, separator: string): string | undefined;
100+
afterLast(this: string, separator: string): string;
101+
beforeLast(this: string, separator: string): string;
102+
tryAfterLast(this: string, separator: string): string | undefined;
103+
tryBeforeLast(this: string, separator: string): string | undefined;
104+
etc(this: string, maxLength: number, etcString?: string): string;
105+
106+
firstUpper(this: string): string;
107+
firstLower(this: string, ): string;
108+
109+
trimEnd(this: string, char?: string): string;
110+
trimStart(this: string, char?: string): string;
111+
112+
repeat(this: string, n: number): string;
113+
}
114+
115+
interface RequestInit {
116+
abortSignal?: AbortSignal;
117+
}
118+
}
2119
Array.prototype.clear = function (): void {
3120
this.length = 0;
4121
};

Signum.React/Signum.React.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
<ItemGroup>
2424
<None Remove="node_modules\**" />
25+
<None Remove="ts_out\**" />
2526
</ItemGroup>
2627

2728
<ItemGroup>

Signum.React/tsconfig.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"module": "esnext",
66
"moduleResolution": "node",
77
"jsx": "react",
8-
"noEmit": true,
8+
"incremental": true,
9+
"outDir": "./ts_out",
10+
//"noEmit": true,
911
"strict": true,
1012
"baseUrl": ".",
1113
"lib": [
@@ -14,5 +16,5 @@
1416
"dom"
1517
]
1618
},
17-
"exclude": [ "node_modules" ]
19+
"exclude": [ "node_modules", "ts_out" ]
1820
}

0 commit comments

Comments
 (0)