Skip to content

Commit 7073387

Browse files
authored
Merge pull request #4450 from timotheeguerin/add-typespec-lang
Add support for TypeSpec language
2 parents 0037b13 + ed45c2e commit 7073387

File tree

5 files changed

+726
-0
lines changed

5 files changed

+726
-0
lines changed

src/basic-languages/monaco.contribution.ts

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ import './systemverilog/systemverilog.contribution';
7979
import './tcl/tcl.contribution';
8080
import './twig/twig.contribution';
8181
import './typescript/typescript.contribution';
82+
import './typespec/typespec.contribution';
8283
import './vb/vb.contribution';
8384
import './wgsl/wgsl.contribution';
8485
import './xml/xml.contribution';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
import { registerLanguage } from '../_.contribution';
7+
8+
declare var AMD: any;
9+
declare var require: any;
10+
11+
registerLanguage({
12+
id: 'typespec',
13+
extensions: ['.tsp'],
14+
aliases: ['TypeSpec'],
15+
loader: () => {
16+
if (AMD) {
17+
return new Promise((resolve, reject) => {
18+
require(['vs/basic-languages/typespec/typespec'], resolve, reject);
19+
});
20+
} else {
21+
return import('./typespec');
22+
}
23+
}
24+
});

0 commit comments

Comments
 (0)