diff --git a/browser/src/Plugins/Api/Oni.ts b/browser/src/Plugins/Api/Oni.ts index 552e1961ea..600f0b1626 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" const react = require("react") // tslint:disable-line no-var-requires @@ -72,8 +72,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 7d447c9f5f..c4482146b8 100644 --- a/browser/src/UI/components/AutoCompletion.tsx +++ b/browser/src/UI/components/AutoCompletion.tsx @@ -31,7 +31,7 @@ export class AutoCompletion extends React.Component return null } - const containerStyle = { + const containerStyle: React.CSSProperties = { position: "absolute", top: this.props.y.toString() + "px", left: this.props.x.toString() + "px", diff --git a/browser/src/UI/components/BufferScrollBar.tsx b/browser/src/UI/components/BufferScrollBar.tsx index 53f58fda14..51f9ba68eb 100644 --- a/browser/src/UI/components/BufferScrollBar.tsx +++ b/browser/src/UI/components/BufferScrollBar.tsx @@ -37,7 +37,7 @@ export class BufferScrollBar 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 481ad2d7f6..fd8d9766cc 100644 --- a/browser/src/UI/components/CursorLine.tsx +++ b/browser/src/UI/components/CursorLine.tsx @@ -27,7 +27,7 @@ class CursorLineRenderer extends React.Component const width = this.props.width - const cursorStyle = { + const cursorStyle: React.CSSProperties = { position: "absolute", left: this.props.x.toString() + "px", // Window Start top: this.props.y.toString() + "px", // Same as cursor diff --git a/browser/src/UI/components/LiveEvalMarker.tsx b/browser/src/UI/components/LiveEvalMarker.tsx index 1ef9bed308..835549b6aa 100644 --- a/browser/src/UI/components/LiveEvalMarker.tsx +++ b/browser/src/UI/components/LiveEvalMarker.tsx @@ -49,7 +49,7 @@ export class LiveEvalMarker extends React.Component const cssClasses = classNames("live-eval-marker", { "evaluating": this._isEvaluating() }, { "error": this._hasError() }) - const positionDivStyles = { + const positionDivStyles: React.CSSProperties = { position: "absolute", top: this.props.y.toString() + "px", right: "0px", diff --git a/browser/src/UI/components/Logs.tsx b/browser/src/UI/components/Logs.tsx index d7292d2f71..ef0402b9cb 100644 --- a/browser/src/UI/components/Logs.tsx +++ b/browser/src/UI/components/Logs.tsx @@ -26,7 +26,7 @@ export class LogsRenderer extends React.Component { // 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 9f4732f432..b65b52590d 100644 --- a/browser/src/UI/components/QuickInfo.tsx +++ b/browser/src/UI/components/QuickInfo.tsx @@ -24,29 +24,29 @@ export class QuickInfo extends React.Component { 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/definitions/Oni.d.ts b/definitions/Oni.d.ts index eb9ed3f61a..5505e602db 100644 --- a/definitions/Oni.d.ts +++ b/definitions/Oni.d.ts @@ -160,7 +160,7 @@ declare namespace Oni { editor: Editor 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 c3630a81a5..08c97319c6 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,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", @@ -111,7 +111,7 @@ "@types/mocha": "2.2.33", "@types/node": "6.0.48", "@types/q": "0.0.32", - "@types/react": "0.14.48", + "@types/react": "15.0.30", "@types/react-dom": "0.14.18", "@types/react-redux": "4.4.38", "@types/sinon": "1.16.32", @@ -145,7 +145,7 @@ "sinon": "1.17.6", "spectron": "3.6.2", "style-loader": "0.13.1", - "ts-loader": "1.2.2", + "ts-loader": "2.2.2", "vscode-jsonrpc": "3.3.1", "vscode-languageserver-types": "3.3.0", "wcwidth": "1.0.1",