Skip to content

Commit 9d125dd

Browse files
authored
Re-enable building VS Code with TS 3.7 (microsoft#82289)
* Re-enable building VS Code with TS 3.7 Reverts 5b0cdad Blocked from check in due to microsoft/TypeScript#33936 * update d.ts for ts 3.7
1 parent 9c0eaf7 commit 9d125dd

8 files changed

Lines changed: 24 additions & 44 deletions

File tree

build/monaco/api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ class DeclarationResolver {
516516
'file.ts': fileContents
517517
};
518518
const service = ts.createLanguageService(new TypeScriptLanguageServiceHost({}, fileMap, {}));
519-
const text = service.getEmitOutput('file.ts', true).outputFiles[0].text;
519+
const text = service.getEmitOutput('file.ts', true, true).outputFiles[0].text;
520520
return new CacheEntry(ts.createSourceFile(fileName, text, ts.ScriptTarget.ES5), mtime);
521521
}
522522
}

build/monaco/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ export class DeclarationResolver {
617617
'file.ts': fileContents
618618
};
619619
const service = ts.createLanguageService(new TypeScriptLanguageServiceHost({}, fileMap, {}));
620-
const text = service.getEmitOutput('file.ts', true).outputFiles[0].text;
620+
const text = service.getEmitOutput('file.ts', true, true).outputFiles[0].text;
621621
return new CacheEntry(
622622
ts.createSourceFile(fileName, text, ts.ScriptTarget.ES5),
623623
mtime

build/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"request": "^2.85.0",
4343
"terser": "4.3.8",
4444
"tslint": "^5.9.1",
45-
"typescript": "3.6.2",
45+
"typescript": "3.7.0-dev.20191017",
4646
"vsce": "1.48.0",
4747
"vscode-telemetry-extractor": "^1.5.4",
4848
"xml2js": "^0.4.17"

build/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2297,10 +2297,10 @@ typed-rest-client@^0.9.0:
22972297
tunnel "0.0.4"
22982298
underscore "1.8.3"
22992299

2300-
typescript@3.6.2:
2301-
version "3.6.2"
2302-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.2.tgz#105b0f1934119dde543ac8eb71af3a91009efe54"
2303-
integrity sha512-lmQ4L+J6mnu3xweP8+rOrUwzmN+MRAj7TgtJtDaXE5PMyX2kCrklhg3rvOsOIfNeAWMQWO2F1GPc1kMD2vLAfw==
2300+
typescript@3.7.0-dev.20191017:
2301+
version "3.7.0-dev.20191017"
2302+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.0-dev.20191017.tgz#e61440dd445edea6d7b9a699e7c5d5fbcd1906f2"
2303+
integrity sha512-Yi0lCPEN0cn9Gp8TEEkPpgKNR5SWAmx9Hmzzz+oEuivw6amURqRGynaLyFZkMA9iMsvYG5LLqhdlFO3uu5ZT/w==
23042304

23052305
typescript@^3.0.1:
23062306
version "3.5.3"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
"source-map": "^0.4.4",
130130
"ts-loader": "^4.4.2",
131131
"tslint": "^5.16.0",
132-
"typescript": "3.6",
132+
"typescript": "3.7.0-dev.20191017",
133133
"typescript-formatter": "7.1.0",
134134
"underscore": "^1.8.2",
135135
"vinyl": "^2.0.0",

src/vs/monaco.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ declare namespace monaco {
4242

4343
export class CancellationTokenSource {
4444
constructor(parent?: CancellationToken);
45-
readonly token: CancellationToken;
45+
get token(): CancellationToken;
4646
cancel(): void;
4747
dispose(cancel?: boolean): void;
4848
}
@@ -118,7 +118,7 @@ declare namespace monaco {
118118
* namely the server name, would be missing. Therefore `Uri#fsPath` exists - it's sugar to ease working
119119
* with URIs that represent files on disk (`file` scheme).
120120
*/
121-
readonly fsPath: string;
121+
get fsPath(): string;
122122
with(change: {
123123
scheme?: string;
124124
authority?: string | null;

src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,7 @@ export class ElectronWebviewBasedWebview extends BaseWebview<WebviewTag> impleme
321321
}
322322

323323
protected postMessage(channel: string, data?: any): void {
324-
if (this.element) {
325-
this.element.send(channel, data);
326-
}
324+
this.element?.send(channel, data);
327325
}
328326

329327
public focus(): void {
@@ -408,57 +406,39 @@ export class ElectronWebviewBasedWebview extends BaseWebview<WebviewTag> impleme
408406
}
409407

410408
public showFind() {
411-
if (this._webviewFindWidget) {
412-
this._webviewFindWidget.reveal();
413-
}
409+
this._webviewFindWidget?.reveal();
414410
}
415411

416412
public hideFind() {
417-
if (this._webviewFindWidget) {
418-
this._webviewFindWidget.hide();
419-
}
413+
this._webviewFindWidget?.hide();
420414
}
421415

422416
public runFindAction(previous: boolean) {
423-
if (this._webviewFindWidget) {
424-
this._webviewFindWidget.find(previous);
425-
}
417+
this._webviewFindWidget?.find(previous);
426418
}
427419

428420
public selectAll() {
429-
if (this.element) {
430-
this.element.selectAll();
431-
}
421+
this.element?.selectAll();
432422
}
433423

434424
public copy() {
435-
if (this.element) {
436-
this.element.copy();
437-
}
425+
this.element?.copy();
438426
}
439427

440428
public paste() {
441-
if (this.element) {
442-
this.element.paste();
443-
}
429+
this.element?.paste();
444430
}
445431

446432
public cut() {
447-
if (this.element) {
448-
this.element.cut();
449-
}
433+
this.element?.cut();
450434
}
451435

452436
public undo() {
453-
if (this.element) {
454-
this.element.undo();
455-
}
437+
this.element?.undo();
456438
}
457439

458440
public redo() {
459-
if (this.element) {
460-
this.element.redo();
461-
}
441+
this.element?.redo();
462442
}
463443

464444
protected on<T = unknown>(channel: WebviewMessageChannels | string, handler: (data: T) => void): IDisposable {

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8510,10 +8510,10 @@ typescript-formatter@7.1.0:
85108510
commandpost "^1.0.0"
85118511
editorconfig "^0.15.0"
85128512

8513-
typescript@3.6:
8514-
version "3.6.2"
8515-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.2.tgz#105b0f1934119dde543ac8eb71af3a91009efe54"
8516-
integrity sha512-lmQ4L+J6mnu3xweP8+rOrUwzmN+MRAj7TgtJtDaXE5PMyX2kCrklhg3rvOsOIfNeAWMQWO2F1GPc1kMD2vLAfw==
8513+
typescript@3.7.0-dev.20191017:
8514+
version "3.7.0-dev.20191017"
8515+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.0-dev.20191017.tgz#e61440dd445edea6d7b9a699e7c5d5fbcd1906f2"
8516+
integrity sha512-Yi0lCPEN0cn9Gp8TEEkPpgKNR5SWAmx9Hmzzz+oEuivw6amURqRGynaLyFZkMA9iMsvYG5LLqhdlFO3uu5ZT/w==
85178517

85188518
typescript@^2.6.2:
85198519
version "2.6.2"

0 commit comments

Comments
 (0)