-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4450 from timotheeguerin/add-typespec-lang
Add support for TypeSpec language
- Loading branch information
Showing
5 changed files
with
726 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | ||
} | ||
} | ||
}); |
Oops, something went wrong.