Skip to content

Commit 83994e1

Browse files
committed
Update LKG
1 parent efe2c56 commit 83994e1

14 files changed

+17911
-13787
lines changed

lib/lib.d.ts

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ interface ObjectConstructor {
200200
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
201201
* @param o Object on which to lock the attributes.
202202
*/
203-
freeze<T>(o: T): T;
203+
freeze<T>(o: T): Readonly<T>;
204204

205205
/**
206206
* Prevents the addition of new properties to an object.
@@ -1363,6 +1363,34 @@ interface ArrayLike<T> {
13631363
readonly [n: number]: T;
13641364
}
13651365

1366+
/**
1367+
* Make all properties in T optional
1368+
*/
1369+
type Partial<T> = {
1370+
[P in keyof T]?: T[P];
1371+
};
1372+
1373+
/**
1374+
* Make all properties in T readonly
1375+
*/
1376+
type Readonly<T> = {
1377+
readonly [P in keyof T]: T[P];
1378+
};
1379+
1380+
/**
1381+
* From T pick a set of properties K
1382+
*/
1383+
type Pick<T, K extends keyof T> = {
1384+
[P in K]: T[P];
1385+
}
1386+
1387+
/**
1388+
* Construct a type with a set of properties K of type T
1389+
*/
1390+
type Record<K extends string | number, T> = {
1391+
[P in K]: T;
1392+
}
1393+
13661394
/**
13671395
* Represents a raw buffer of binary data, which is used to store data for the
13681396
* different typed arrays. ArrayBuffers cannot be read from or written to directly,

lib/lib.es2015.core.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,27 +225,27 @@ interface NumberConstructor {
225225
* number. Only finite values of the type number, result in true.
226226
* @param number A numeric value.
227227
*/
228-
isFinite(value: any): value is number;
228+
isFinite(number: number): boolean;
229229

230230
/**
231231
* Returns true if the value passed is an integer, false otherwise.
232232
* @param number A numeric value.
233233
*/
234-
isInteger(value: any): value is number;
234+
isInteger(number: number): boolean;
235235

236236
/**
237237
* Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
238238
* number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter
239239
* to a number. Only values of the type number, that are also NaN, result in true.
240240
* @param number A numeric value.
241241
*/
242-
isNaN(value: any): value is number;
242+
isNaN(number: number): boolean;
243243

244244
/**
245245
* Returns true if the value passed is a safe integer.
246246
* @param number A numeric value.
247247
*/
248-
isSafeInteger(value: any): value is number;
248+
isSafeInteger(number: number): boolean;
249249

250250
/**
251251
* The value of the largest integer n such that n and n + 1 are both exactly representable as

lib/lib.es5.d.ts

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ interface ObjectConstructor {
200200
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
201201
* @param o Object on which to lock the attributes.
202202
*/
203-
freeze<T>(o: T): T;
203+
freeze<T>(o: T): Readonly<T>;
204204

205205
/**
206206
* Prevents the addition of new properties to an object.
@@ -1363,6 +1363,34 @@ interface ArrayLike<T> {
13631363
readonly [n: number]: T;
13641364
}
13651365

1366+
/**
1367+
* Make all properties in T optional
1368+
*/
1369+
type Partial<T> = {
1370+
[P in keyof T]?: T[P];
1371+
};
1372+
1373+
/**
1374+
* Make all properties in T readonly
1375+
*/
1376+
type Readonly<T> = {
1377+
readonly [P in keyof T]: T[P];
1378+
};
1379+
1380+
/**
1381+
* From T pick a set of properties K
1382+
*/
1383+
type Pick<T, K extends keyof T> = {
1384+
[P in K]: T[P];
1385+
}
1386+
1387+
/**
1388+
* Construct a type with a set of properties K of type T
1389+
*/
1390+
type Record<K extends string | number, T> = {
1391+
[P in K]: T;
1392+
}
1393+
13661394
/**
13671395
* Represents a raw buffer of binary data, which is used to store data for the
13681396
* different typed arrays. ArrayBuffers cannot be read from or written to directly,

lib/lib.es6.d.ts

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ interface ObjectConstructor {
200200
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
201201
* @param o Object on which to lock the attributes.
202202
*/
203-
freeze<T>(o: T): T;
203+
freeze<T>(o: T): Readonly<T>;
204204

205205
/**
206206
* Prevents the addition of new properties to an object.
@@ -1363,6 +1363,34 @@ interface ArrayLike<T> {
13631363
readonly [n: number]: T;
13641364
}
13651365

1366+
/**
1367+
* Make all properties in T optional
1368+
*/
1369+
type Partial<T> = {
1370+
[P in keyof T]?: T[P];
1371+
};
1372+
1373+
/**
1374+
* Make all properties in T readonly
1375+
*/
1376+
type Readonly<T> = {
1377+
readonly [P in keyof T]: T[P];
1378+
};
1379+
1380+
/**
1381+
* From T pick a set of properties K
1382+
*/
1383+
type Pick<T, K extends keyof T> = {
1384+
[P in K]: T[P];
1385+
}
1386+
1387+
/**
1388+
* Construct a type with a set of properties K of type T
1389+
*/
1390+
type Record<K extends string | number, T> = {
1391+
[P in K]: T;
1392+
}
1393+
13661394
/**
13671395
* Represents a raw buffer of binary data, which is used to store data for the
13681396
* different typed arrays. ArrayBuffers cannot be read from or written to directly,
@@ -4362,27 +4390,27 @@ interface NumberConstructor {
43624390
* number. Only finite values of the type number, result in true.
43634391
* @param number A numeric value.
43644392
*/
4365-
isFinite(value: any): value is number;
4393+
isFinite(number: number): boolean;
43664394

43674395
/**
43684396
* Returns true if the value passed is an integer, false otherwise.
43694397
* @param number A numeric value.
43704398
*/
4371-
isInteger(value: any): value is number;
4399+
isInteger(number: number): boolean;
43724400

43734401
/**
43744402
* Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
43754403
* number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter
43764404
* to a number. Only values of the type number, that are also NaN, result in true.
43774405
* @param number A numeric value.
43784406
*/
4379-
isNaN(value: any): value is number;
4407+
isNaN(number: number): boolean;
43804408

43814409
/**
43824410
* Returns true if the value passed is a safe integer.
43834411
* @param number A numeric value.
43844412
*/
4385-
isSafeInteger(value: any): value is number;
4413+
isSafeInteger(number: number): boolean;
43864414

43874415
/**
43884416
* The value of the largest integer n such that n and n + 1 are both exactly representable as

lib/protocol.d.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,6 +1400,25 @@ declare namespace ts.server.protocol {
14001400
body?: ConfigFileDiagnosticEventBody;
14011401
event: "configFileDiag";
14021402
}
1403+
type ProjectLanguageServiceStateEventName = "projectLanguageServiceState";
1404+
interface ProjectLanguageServiceStateEvent extends Event {
1405+
event: ProjectLanguageServiceStateEventName;
1406+
body?: ProjectLanguageServiceStateEventBody;
1407+
}
1408+
interface ProjectLanguageServiceStateEventBody {
1409+
/**
1410+
* Project name that has changes in the state of language service.
1411+
* For configured projects this will be the config file path.
1412+
* For external projects this will be the name of the projects specified when project was open.
1413+
* For inferred projects this event is not raised.
1414+
*/
1415+
projectName: string;
1416+
/**
1417+
* True if language service state switched from disabled to enabled
1418+
* and false otherwise.
1419+
*/
1420+
languageServiceEnabled: boolean;
1421+
}
14031422
/**
14041423
* Arguments for reload request.
14051424
*/
@@ -1634,6 +1653,10 @@ declare namespace ts.server.protocol {
16341653
* true if install request succeeded, otherwise - false
16351654
*/
16361655
installSuccess: boolean;
1656+
/**
1657+
* version of typings installer
1658+
*/
1659+
typingsInstallerVersion: string;
16371660
}
16381661
interface NavBarResponse extends Response {
16391662
body?: NavigationBarItem[];

0 commit comments

Comments
 (0)