Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for TypeSpec language #4450

Merged
merged 4 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/basic-languages/monaco.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ import './systemverilog/systemverilog.contribution';
import './tcl/tcl.contribution';
import './twig/twig.contribution';
import './typescript/typescript.contribution';
import './typespec/typespec.contribution';
import './vb/vb.contribution';
import './wgsl/wgsl.contribution';
import './xml/xml.contribution';
Expand Down
24 changes: 24 additions & 0 deletions src/basic-languages/typespec/typespec.contribution.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { registerLanguage } from '../_.contribution';

declare var AMD: any;
declare var require: any;

registerLanguage({
id: 'typespec',
extensions: ['.tsp'],
aliases: ['TypeSpec'],
loader: () => {
if (AMD) {
return new Promise((resolve, reject) => {
require(['vs/basic-languages/typespec/typespec'], resolve, reject);
});
} else {
return import('./typespec');
}
}
});
Loading
Loading