From 98de62b8c0f4c4ba42ce03006c796f3720321610 Mon Sep 17 00:00:00 2001 From: extr0py Date: Fri, 11 Aug 2017 12:03:15 -0700 Subject: [PATCH 1/2] Bring back TS upgrade --- browser/src/Plugins/Api/Oni.ts | 6 +++--- browser/src/UI/components/AutoCompletion.tsx | 2 +- browser/src/UI/components/BufferScrollBar.tsx | 4 ++-- browser/src/UI/components/Cursor.tsx | 2 +- browser/src/UI/components/CursorLine.tsx | 2 +- browser/src/UI/components/Logs.tsx | 2 +- browser/src/UI/components/QuickInfo.tsx | 10 +++++----- browser/src/neovim/NeovimInstance.ts | 4 ++-- definitions/Oni.d.ts | 2 +- package.json | 4 ++-- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/browser/src/Plugins/Api/Oni.ts b/browser/src/Plugins/Api/Oni.ts index f3c9041fd4..78e9fd1db0 100644 --- a/browser/src/Plugins/Api/Oni.ts +++ b/browser/src/Plugins/Api/Oni.ts @@ -10,7 +10,7 @@ import { Editor } from "./Editor" import { StatusBar } from "./StatusBar" import { DebouncedLanguageService } from "./DebouncedLanguageService" -import { InitializationParamsCreator, LanguageClient } from "./LanguageClient/LanguageClient" +import { InitializationParamsCreator, LanguageClient, ServerRunOptions } from "./LanguageClient/LanguageClient" import { Process } from "./Process" import { Services } from "./Services" @@ -94,8 +94,8 @@ export class Oni extends EventEmitter implements Oni.Plugin.Api { }) } - public createLanguageClient(initializationCommand: string, initializationParamsCreator: InitializationParamsCreator): LanguageClient { - return new LanguageClient(initializationCommand, initializationParamsCreator, this) + public createLanguageClient(startOptions: ServerRunOptions, initializationParamsCreator: InitializationParamsCreator): LanguageClient { + return new LanguageClient(startOptions, initializationParamsCreator, this) } public registerLanguageService(languageService: Oni.Plugin.LanguageService): void { diff --git a/browser/src/UI/components/AutoCompletion.tsx b/browser/src/UI/components/AutoCompletion.tsx index a60c8d4d55..b356fa76ba 100644 --- a/browser/src/UI/components/AutoCompletion.tsx +++ b/browser/src/UI/components/AutoCompletion.tsx @@ -31,7 +31,7 @@ export class AutoCompletion extends React.PureComponent { const width = isNormalMode ? this.props.width : this.props.width / 4 const characterToShow = isNormalMode ? this.props.character : "" - const cursorStyle = { + const cursorStyle: React.CSSProperties = { position: "absolute", left: this.props.x.toString() + "px", top: this.props.y.toString() + "px", diff --git a/browser/src/UI/components/CursorLine.tsx b/browser/src/UI/components/CursorLine.tsx index bd1f78a13d..3135ba71aa 100644 --- a/browser/src/UI/components/CursorLine.tsx +++ b/browser/src/UI/components/CursorLine.tsx @@ -28,7 +28,7 @@ class CursorLineRenderer extends React.PureComponent { // TODO copy details to clipboard if (!this.props.visible) { return null } - const maxHeightStyle = { + const maxHeightStyle: React.CSSProperties = { "height": "25vh", "maxHeight": "25vh", "overflow": "auto", diff --git a/browser/src/UI/components/QuickInfo.tsx b/browser/src/UI/components/QuickInfo.tsx index 4487ad5999..5d7c0f9714 100644 --- a/browser/src/UI/components/QuickInfo.tsx +++ b/browser/src/UI/components/QuickInfo.tsx @@ -24,29 +24,29 @@ export class QuickInfo extends React.PureComponent { const openFromTop = this.props.openFromTop || false - const containerStyle = { + const containerStyle: React.CSSProperties = { position: "absolute", top: this.props.y.toString() + "px", left: this.props.x.toString() + "px", } - const innerCommonStyle = { + const innerCommonStyle: React.CSSProperties = { "position": "absolute", "opacity": this.props.visible ? 1 : 0, "max-width": (document.body.offsetWidth - this.props.x - 40) + "px", } - const openFromTopStyle = { + const openFromTopStyle: React.CSSProperties = { ...innerCommonStyle, "top": "0px", } - const openFromBottomStyle = { + const openFromBottomStyle: React.CSSProperties = { ...innerCommonStyle, "bottom": "0px", } - const innerStyle = openFromTop ? openFromTopStyle : openFromBottomStyle + const innerStyle: React.CSSProperties = openFromTop ? openFromTopStyle : openFromBottomStyle return
diff --git a/browser/src/neovim/NeovimInstance.ts b/browser/src/neovim/NeovimInstance.ts index 991c89025b..5690a263f9 100644 --- a/browser/src/neovim/NeovimInstance.ts +++ b/browser/src/neovim/NeovimInstance.ts @@ -252,11 +252,11 @@ export class NeovimInstance extends EventEmitter implements INeovimInstance { return this._neovim.request("nvim_eval", [expression]) } - public command(command: string): Promise { + public command(command: string): Promise { return this._neovim.request("nvim_command", [command]) } - public callFunction(functionName: string, args: any[]): Promise { + public callFunction(functionName: string, args: any[]): Promise { return this._neovim.request("nvim_call_function", [functionName, args]) } diff --git a/definitions/Oni.d.ts b/definitions/Oni.d.ts index d5603b39fe..c9fcda9a78 100644 --- a/definitions/Oni.d.ts +++ b/definitions/Oni.d.ts @@ -160,7 +160,7 @@ declare namespace Oni { process: Process statusBar: StatusBar - registerLanguageService(languageType: string, languageService: LanguageService) + registerLanguageService(languageService: LanguageService) clearHighlights(file: string, key: string) setHighlights(file: string, key: string, highlights: SyntaxHighlight[]) diff --git a/package.json b/package.json index c3ecb52a02..9a3e4a6298 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "omnisharp-client": "7.0.6", "q": "1.4.1", "tslint": "4.0.2", - "typescript": "2.2.1" + "typescript": "2.4.1" }, "devDependencies": { "@types/classnames": "0.0.32", @@ -122,7 +122,7 @@ "@types/msgpack-lite": "0.1.4", "@types/node": "6.0.48", "@types/q": "0.0.32", - "@types/react": "0.14.48", + "@types/react": "15.0.30", "@types/react-addons-perf": "0.14.18", "@types/react-dom": "0.14.18", "@types/react-redux": "4.4.38", From a718187b0405262554705d006340d26d06ae7915 Mon Sep 17 00:00:00 2001 From: extr0py Date: Fri, 11 Aug 2017 12:03:48 -0700 Subject: [PATCH 2/2] Bump typescript to 2.4.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9a3e4a6298..9fdd312165 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "omnisharp-client": "7.0.6", "q": "1.4.1", "tslint": "4.0.2", - "typescript": "2.4.1" + "typescript": "2.4.2" }, "devDependencies": { "@types/classnames": "0.0.32",