Language service extensibility

This commit is contained in:
Ryan Cavanaugh
2017-02-14 13:35:16 -08:00
parent 81f4e38643
commit aec310996c
14 changed files with 325 additions and 12 deletions

View File

@@ -0,0 +1,19 @@
/// <reference path="../fourslash.ts"/>
// @Filename: tsconfig.json
//// {
//// "compilerOptions": {
//// "plugins": [
//// { "name": "quickinfo-augmeneter", "message": "hello world" }
//// ]
//// },
//// "files": ["a.ts"]
//// }
// @Filename: a.ts
//// let x = [1, 2];
//// x/**/
////
goTo.marker();
verify.quickInfoIs('Proxied x: number[]hello world');

View File

@@ -0,0 +1,20 @@
/// <reference path="../fourslash.ts"/>
// @Filename: tsconfig.json
//// {
//// "compilerOptions": {
//// "plugins": [
//// { "name": "invalidmodulename" }
//// ]
//// },
//// "files": ["a.ts"]
//// }
// @Filename: a.ts
//// let x = [1, 2];
//// x/**/
////
// LS shouldn't crash/fail if a plugin fails to load
goTo.marker();
verify.quickInfoIs('let x: number[]');

View File

@@ -0,0 +1,20 @@
/// <reference path="../fourslash.ts"/>
// @Filename: tsconfig.json
//// {
//// "compilerOptions": {
//// "plugins": [
//// { "name": "create-thrower" }
//// ]
//// },
//// "files": ["a.ts"]
//// }
// @Filename: a.ts
//// let x = [1, 2];
//// x/**/
////
// LS shouldn't crash/fail if a plugin fails to init correctly
goTo.marker();
verify.quickInfoIs('let x: number[]');

View File

@@ -0,0 +1,20 @@
/// <reference path="../fourslash.ts"/>
// @Filename: tsconfig.json
//// {
//// "compilerOptions": {
//// "plugins": [
//// { "name": "diagnostic-adder" }
//// ]
//// },
//// "files": ["a.ts"]
//// }
// @Filename: a.ts
//// let x = [1, 2];
//// x/**/
////
// Test adding an error message
goTo.marker();
verify.numberOfErrorsInCurrentFile(1);