Skip to content

Commit 1de6c28

Browse files
committed
Generated module conversion step - unindent
This step makes further commits look clearer by unindenting all of the top level namespaces preemptively.
1 parent 24aae59 commit 1de6c28

File tree

431 files changed

+263385
-263385
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

431 files changed

+263385
-263385
lines changed

src/compiler/binder.ts

+3,056-3,056
Large diffs are not rendered by default.

src/compiler/builder.ts

+1,519-1,519
Large diffs are not rendered by default.

src/compiler/builderPublic.ts

+164-164
Large diffs are not rendered by default.

src/compiler/builderState.ts

+535-535
Large diffs are not rendered by default.

src/compiler/builderStatePublic.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
namespace ts {
2-
export interface EmitOutput {
3-
outputFiles: OutputFile[];
4-
emitSkipped: boolean;
5-
/* @internal */ diagnostics: readonly Diagnostic[];
6-
}
2+
export interface EmitOutput {
3+
outputFiles: OutputFile[];
4+
emitSkipped: boolean;
5+
/* @internal */ diagnostics: readonly Diagnostic[];
6+
}
77

8-
export interface OutputFile {
9-
name: string;
10-
writeByteOrderMark: boolean;
11-
text: string;
12-
/* @internal */ data?: WriteFileCallbackData;
13-
}
8+
export interface OutputFile {
9+
name: string;
10+
writeByteOrderMark: boolean;
11+
text: string;
12+
/* @internal */ data?: WriteFileCallbackData;
13+
}
1414
}

src/compiler/checker.ts

+39,311-39,311
Large diffs are not rendered by default.

src/compiler/commandLineParser.ts

+3,413-3,413
Large diffs are not rendered by default.

src/compiler/core.ts

+2,080-2,080
Large diffs are not rendered by default.

src/compiler/corePublic.ts

+131-131
Original file line numberDiff line numberDiff line change
@@ -1,157 +1,157 @@
11
namespace ts {
2-
// WARNING: The script `configurePrerelease.ts` uses a regexp to parse out these values.
3-
// If changing the text in this section, be sure to test `configurePrerelease` too.
4-
export const versionMajorMinor = "5.0";
5-
// The following is baselined as a literal template type without intervention
6-
/** The version of the TypeScript compiler release */
7-
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
8-
export const version: string = `${versionMajorMinor}.0-dev`;
2+
// WARNING: The script `configurePrerelease.ts` uses a regexp to parse out these values.
3+
// If changing the text in this section, be sure to test `configurePrerelease` too.
4+
export const versionMajorMinor = "5.0";
5+
// The following is baselined as a literal template type without intervention
6+
/** The version of the TypeScript compiler release */
7+
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
8+
export const version: string = `${versionMajorMinor}.0-dev`;
9+
10+
/**
11+
* Type of objects whose values are all of the same type.
12+
* The `in` and `for-in` operators can *not* be safely used,
13+
* since `Object.prototype` may be modified by outside code.
14+
*/
15+
export interface MapLike<T> {
16+
[index: string]: T;
17+
}
918

10-
/**
11-
* Type of objects whose values are all of the same type.
12-
* The `in` and `for-in` operators can *not* be safely used,
13-
* since `Object.prototype` may be modified by outside code.
14-
*/
15-
export interface MapLike<T> {
16-
[index: string]: T;
17-
}
19+
export interface SortedReadonlyArray<T> extends ReadonlyArray<T> {
20+
" __sortedArrayBrand": any;
21+
}
1822

19-
export interface SortedReadonlyArray<T> extends ReadonlyArray<T> {
20-
" __sortedArrayBrand": any;
21-
}
23+
export interface SortedArray<T> extends Array<T> {
24+
" __sortedArrayBrand": any;
25+
}
2226

23-
export interface SortedArray<T> extends Array<T> {
24-
" __sortedArrayBrand": any;
25-
}
27+
/** Common read methods for ES6 Map/Set. */
28+
export interface ReadonlyCollection<K> {
29+
readonly size: number;
30+
has(key: K): boolean;
31+
keys(): Iterator<K>;
32+
}
2633

27-
/** Common read methods for ES6 Map/Set. */
28-
export interface ReadonlyCollection<K> {
29-
readonly size: number;
30-
has(key: K): boolean;
31-
keys(): Iterator<K>;
32-
}
34+
/** Common write methods for ES6 Map/Set. */
35+
export interface Collection<K> extends ReadonlyCollection<K> {
36+
delete(key: K): boolean;
37+
clear(): void;
38+
}
3339

34-
/** Common write methods for ES6 Map/Set. */
35-
export interface Collection<K> extends ReadonlyCollection<K> {
36-
delete(key: K): boolean;
37-
clear(): void;
38-
}
40+
/** ES6 Map interface, only read methods included. */
41+
export interface ReadonlyESMap<K, V> extends ReadonlyCollection<K> {
42+
get(key: K): V | undefined;
43+
values(): Iterator<V>;
44+
entries(): Iterator<[K, V]>;
45+
forEach(action: (value: V, key: K) => void): void;
46+
}
3947

40-
/** ES6 Map interface, only read methods included. */
41-
export interface ReadonlyESMap<K, V> extends ReadonlyCollection<K> {
42-
get(key: K): V | undefined;
43-
values(): Iterator<V>;
44-
entries(): Iterator<[K, V]>;
45-
forEach(action: (value: V, key: K) => void): void;
46-
}
48+
/**
49+
* ES6 Map interface, only read methods included.
50+
*/
51+
export interface ReadonlyMap<T> extends ReadonlyESMap<string, T> {
52+
}
4753

48-
/**
49-
* ES6 Map interface, only read methods included.
50-
*/
51-
export interface ReadonlyMap<T> extends ReadonlyESMap<string, T> {
52-
}
54+
/** ES6 Map interface. */
55+
export interface ESMap<K, V> extends ReadonlyESMap<K, V>, Collection<K> {
56+
set(key: K, value: V): this;
57+
}
5358

54-
/** ES6 Map interface. */
55-
export interface ESMap<K, V> extends ReadonlyESMap<K, V>, Collection<K> {
56-
set(key: K, value: V): this;
57-
}
59+
/**
60+
* ES6 Map interface.
61+
*/
62+
export interface Map<T> extends ESMap<string, T> {
63+
}
5864

59-
/**
60-
* ES6 Map interface.
61-
*/
62-
export interface Map<T> extends ESMap<string, T> {
63-
}
65+
/* @internal */
66+
export interface MapConstructor {
67+
// eslint-disable-next-line @typescript-eslint/prefer-function-type
68+
new <K, V>(iterable?: readonly (readonly [K, V])[] | ReadonlyESMap<K, V>): ESMap<K, V>;
69+
}
6470

65-
/* @internal */
66-
export interface MapConstructor {
67-
// eslint-disable-next-line @typescript-eslint/prefer-function-type
68-
new <K, V>(iterable?: readonly (readonly [K, V])[] | ReadonlyESMap<K, V>): ESMap<K, V>;
69-
}
71+
/** ES6 Set interface, only read methods included. */
72+
export interface ReadonlySet<T> extends ReadonlyCollection<T> {
73+
has(value: T): boolean;
74+
values(): Iterator<T>;
75+
entries(): Iterator<[T, T]>;
76+
forEach(action: (value: T, key: T) => void): void;
77+
}
7078

71-
/** ES6 Set interface, only read methods included. */
72-
export interface ReadonlySet<T> extends ReadonlyCollection<T> {
73-
has(value: T): boolean;
74-
values(): Iterator<T>;
75-
entries(): Iterator<[T, T]>;
76-
forEach(action: (value: T, key: T) => void): void;
77-
}
79+
/** ES6 Set interface. */
80+
export interface Set<T> extends ReadonlySet<T>, Collection<T> {
81+
add(value: T): this;
82+
delete(value: T): boolean;
83+
}
7884

79-
/** ES6 Set interface. */
80-
export interface Set<T> extends ReadonlySet<T>, Collection<T> {
81-
add(value: T): this;
82-
delete(value: T): boolean;
83-
}
85+
/* @internal */
86+
export interface SetConstructor {
87+
// eslint-disable-next-line @typescript-eslint/prefer-function-type
88+
new <T>(iterable?: readonly T[] | ReadonlySet<T>): Set<T>;
89+
}
8490

85-
/* @internal */
86-
export interface SetConstructor {
87-
// eslint-disable-next-line @typescript-eslint/prefer-function-type
88-
new <T>(iterable?: readonly T[] | ReadonlySet<T>): Set<T>;
89-
}
91+
/** ES6 Iterator type. */
92+
export interface Iterator<T> {
93+
next(): { value: T, done?: false } | { value: void, done: true };
94+
}
9095

91-
/** ES6 Iterator type. */
92-
export interface Iterator<T> {
93-
next(): { value: T, done?: false } | { value: void, done: true };
94-
}
96+
/** Array that is only intended to be pushed to, never read. */
97+
export interface Push<T> {
98+
push(...values: T[]): void;
99+
/* @internal*/ readonly length: number;
100+
}
95101

96-
/** Array that is only intended to be pushed to, never read. */
97-
export interface Push<T> {
98-
push(...values: T[]): void;
99-
/* @internal*/ readonly length: number;
100-
}
102+
/* @internal */
103+
export type EqualityComparer<T> = (a: T, b: T) => boolean;
104+
105+
/* @internal */
106+
export type Comparer<T> = (a: T, b: T) => Comparison;
101107

102-
/* @internal */
103-
export type EqualityComparer<T> = (a: T, b: T) => boolean;
108+
/* @internal */
109+
export const enum Comparison {
110+
LessThan = -1,
111+
EqualTo = 0,
112+
GreaterThan = 1
113+
}
104114

105-
/* @internal */
106-
export type Comparer<T> = (a: T, b: T) => Comparison;
115+
/* @internal */
116+
namespace NativeCollections {
117+
declare const self: any;
107118

108-
/* @internal */
109-
export const enum Comparison {
110-
LessThan = -1,
111-
EqualTo = 0,
112-
GreaterThan = 1
113-
}
119+
const globals = typeof globalThis !== "undefined" ? globalThis :
120+
typeof global !== "undefined" ? global :
121+
typeof self !== "undefined" ? self :
122+
undefined;
114123

115-
/* @internal */
116-
namespace NativeCollections {
117-
declare const self: any;
118-
119-
const globals = typeof globalThis !== "undefined" ? globalThis :
120-
typeof global !== "undefined" ? global :
121-
typeof self !== "undefined" ? self :
122-
undefined;
123-
124-
/**
125-
* Returns the native Map implementation if it is available and compatible (i.e. supports iteration).
126-
*/
127-
export function tryGetNativeMap(): MapConstructor {
128-
// Internet Explorer's Map doesn't support iteration, so don't use it.
129-
const gMap = globals?.Map;
130-
// eslint-disable-next-line local/no-in-operator
131-
const constructor = typeof gMap !== "undefined" && "entries" in gMap.prototype && new gMap([[0, 0]]).size === 1 ? gMap : undefined;
132-
if (!constructor) {
133-
throw new Error("No compatible Map implementation found.");
134-
}
135-
return constructor;
124+
/**
125+
* Returns the native Map implementation if it is available and compatible (i.e. supports iteration).
126+
*/
127+
export function tryGetNativeMap(): MapConstructor {
128+
// Internet Explorer's Map doesn't support iteration, so don't use it.
129+
const gMap = globals?.Map;
130+
// eslint-disable-next-line local/no-in-operator
131+
const constructor = typeof gMap !== "undefined" && "entries" in gMap.prototype && new gMap([[0, 0]]).size === 1 ? gMap : undefined;
132+
if (!constructor) {
133+
throw new Error("No compatible Map implementation found.");
136134
}
135+
return constructor;
136+
}
137137

138-
/**
139-
* Returns the native Set implementation if it is available and compatible (i.e. supports iteration).
140-
*/
141-
export function tryGetNativeSet(): SetConstructor {
142-
// Internet Explorer's Set doesn't support iteration, so don't use it.
143-
const gSet = globals?.Set;
144-
// eslint-disable-next-line local/no-in-operator
145-
const constructor = typeof gSet !== "undefined" && "entries" in gSet.prototype && new gSet([0]).size === 1 ? gSet : undefined;
146-
if (!constructor) {
147-
throw new Error("No compatible Set implementation found.");
148-
}
149-
return constructor;
138+
/**
139+
* Returns the native Set implementation if it is available and compatible (i.e. supports iteration).
140+
*/
141+
export function tryGetNativeSet(): SetConstructor {
142+
// Internet Explorer's Set doesn't support iteration, so don't use it.
143+
const gSet = globals?.Set;
144+
// eslint-disable-next-line local/no-in-operator
145+
const constructor = typeof gSet !== "undefined" && "entries" in gSet.prototype && new gSet([0]).size === 1 ? gSet : undefined;
146+
if (!constructor) {
147+
throw new Error("No compatible Set implementation found.");
150148
}
149+
return constructor;
151150
}
151+
}
152152

153-
/* @internal */
154-
export const Map = NativeCollections.tryGetNativeMap();
155-
/* @internal */
156-
export const Set = NativeCollections.tryGetNativeSet();
153+
/* @internal */
154+
export const Map = NativeCollections.tryGetNativeMap();
155+
/* @internal */
156+
export const Set = NativeCollections.tryGetNativeSet();
157157
}

0 commit comments

Comments
 (0)