mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 23:13:02 +01:00
Adopt TS 2.7.2
This commit is contained in:
parent
19b622bb0a
commit
4514e58f07
11 changed files with 39255 additions and 24472 deletions
|
|
@ -24,6 +24,12 @@ This npm module is bundled and distributed in the [monaco-editor](https://www.np
|
|||
* open `$/monaco-typescript/test/index.html` in your favorite browser.
|
||||
* test with `npm run test`
|
||||
|
||||
## Updating TypeScript
|
||||
|
||||
* change typescript's version in `package.json`.
|
||||
* execute `npm install .`
|
||||
* execute `npm run import-typescript`
|
||||
* adopt new APIs
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2217
lib/typescriptServices.d.ts
vendored
2217
lib/typescriptServices.d.ts
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
2045
package-lock.json
generated
Normal file
2045
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -3,9 +3,10 @@
|
|||
"version": "2.3.0",
|
||||
"description": "TypeScript and JavaScript language support for Monaco Editor",
|
||||
"scripts": {
|
||||
"test": "node_modules/.bin/mocha",
|
||||
"watch": "node_modules/.bin/gulp watch",
|
||||
"prepublish": "node_modules/.bin/gulp release"
|
||||
"test": "mocha",
|
||||
"watch": "gulp watch",
|
||||
"prepublish": "gulp release",
|
||||
"import-typescript": "gulp import-typescript"
|
||||
},
|
||||
"author": "Microsoft Corporation",
|
||||
"license": "MIT",
|
||||
|
|
@ -27,6 +28,6 @@
|
|||
"monaco-editor-core": "^0.10.0",
|
||||
"object-assign": "^4.1.0",
|
||||
"rimraf": "^2.5.2",
|
||||
"typescript": "2.4.1"
|
||||
"typescript": "2.7.2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -429,7 +429,7 @@ export class OutlineAdapter extends Adapter implements monaco.languages.Document
|
|||
const convert = (bucket: monaco.languages.SymbolInformation[], item: ts.NavigationBarItem, containerLabel?: string): void => {
|
||||
let result: monaco.languages.SymbolInformation = {
|
||||
name: item.text,
|
||||
kind: outlineTypeTable[item.kind] || monaco.languages.SymbolKind.Variable,
|
||||
kind: <monaco.languages.SymbolKind>(outlineTypeTable[item.kind] || monaco.languages.SymbolKind.Variable),
|
||||
location: {
|
||||
uri: resource,
|
||||
range: this._textSpanToRange(resource, item.spans[0])
|
||||
|
|
|
|||
|
|
@ -140,11 +140,11 @@ export class TypeScriptWorker implements ts.LanguageServiceHost {
|
|||
}
|
||||
|
||||
getCompletionsAtPosition(fileName: string, position: number): Promise<ts.CompletionInfo> {
|
||||
return Promise.as(this._languageService.getCompletionsAtPosition(fileName, position));
|
||||
return Promise.as(this._languageService.getCompletionsAtPosition(fileName, position, undefined));
|
||||
}
|
||||
|
||||
getCompletionEntryDetails(fileName: string, position: number, entry: string): Promise<ts.CompletionEntryDetails> {
|
||||
return Promise.as(this._languageService.getCompletionEntryDetails(fileName, position, entry));
|
||||
return Promise.as(this._languageService.getCompletionEntryDetails(fileName, position, entry, undefined, undefined));
|
||||
}
|
||||
|
||||
getSignatureHelpItems(fileName: string, position: number): Promise<ts.SignatureHelpItems> {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,17 @@
|
|||
var requirejs = require("requirejs");
|
||||
var path = require('path');
|
||||
|
||||
requirejs.config({
|
||||
baseUrl: 'out',
|
||||
paths: {
|
||||
'vs/language/typescript': __dirname + '/../out'
|
||||
'vs/language/typescript': path.join(__dirname, '/../out')
|
||||
},
|
||||
nodeRequire: require
|
||||
});
|
||||
|
||||
// Workaround for TypeScript
|
||||
process.browser = true;
|
||||
|
||||
requirejs([
|
||||
'vs/language/typescript/test/tokenization.test'
|
||||
], function () {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<h2>Monaco Editor HTML test page</h2>
|
||||
<h2>Monaco Editor TypeScript test page</h2>
|
||||
<div id="container" style="width:800px;height:600px;border:1px solid grey"></div>
|
||||
|
||||
<script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue