Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Fix #519 - Upgrade typescript 2.4.2 #601

Merged
merged 2 commits into from
Aug 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions browser/src/Plugins/Api/Oni.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion browser/src/UI/components/AutoCompletion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class AutoCompletion extends React.PureComponent<IAutoCompletionProps, vo
return null
}

const containerStyle = {
const containerStyle: React.CSSProperties = {
position: "absolute",
top: this.props.y.toString() + "px",
left: this.props.x.toString() + "px",
Expand Down
4 changes: 2 additions & 2 deletions browser/src/UI/components/BufferScrollBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class BufferScrollBar extends React.PureComponent<IBufferScrollBarProps,
const windowHeight = ((this.props.windowBottomLine - this.props.windowTopLine + 1) / this.props.bufferSize) * this.props.height
const windowTop = ((this.props.windowTopLine - 1) / this.props.bufferSize) * this.props.height

const windowStyle = {
const windowStyle: React.CSSProperties = {
top: windowTop + "px",
height: windowHeight + "px",
}
Expand All @@ -51,7 +51,7 @@ export class BufferScrollBar extends React.PureComponent<IBufferScrollBarProps,
const pos = (line / this.props.bufferSize) * this.props.height
const size = "2px"

const markerStyle = {
const markerStyle: React.CSSProperties = {
position: "absolute",
top: pos + "px",
height: size,
Expand Down
2 changes: 1 addition & 1 deletion browser/src/UI/components/Cursor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class CursorRenderer extends React.PureComponent<ICursorProps, void> {
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",
Expand Down
2 changes: 1 addition & 1 deletion browser/src/UI/components/CursorLine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class CursorLineRenderer extends React.PureComponent<ICursorLineRendererProps, v

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
Expand Down
2 changes: 1 addition & 1 deletion browser/src/UI/components/Logs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class LogsRenderer extends React.PureComponent<ILogsProps, void> {
// TODO copy details to clipboard
if (!this.props.visible) { return null }

const maxHeightStyle = {
const maxHeightStyle: React.CSSProperties = {
"height": "25vh",
"maxHeight": "25vh",
"overflow": "auto",
Expand Down
10 changes: 5 additions & 5 deletions browser/src/UI/components/QuickInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,29 @@ export class QuickInfo extends React.PureComponent<IQuickInfoProps, void> {

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 <div key={"quickinfo-container"} className="quickinfo-container enable-mouse" style={containerStyle}>
<div key={"quickInfo"} style={innerStyle} className="quickinfo">
Expand Down
4 changes: 2 additions & 2 deletions browser/src/neovim/NeovimInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,11 @@ export class NeovimInstance extends EventEmitter implements INeovimInstance {
return this._neovim.request("nvim_eval", [expression])
}

public command(command: string): Promise<any> {
public command(command: string): Promise<void> {
return this._neovim.request("nvim_command", [command])
}

public callFunction(functionName: string, args: any[]): Promise<any> {
public callFunction(functionName: string, args: any[]): Promise<void> {
return this._neovim.request("nvim_call_function", [functionName, args])
}

Expand Down
2 changes: 1 addition & 1 deletion definitions/Oni.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[])
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"omnisharp-client": "7.0.6",
"q": "1.4.1",
"tslint": "4.0.2",
"typescript": "2.2.1"
"typescript": "2.4.2"
},
"devDependencies": {
"@types/classnames": "0.0.32",
Expand All @@ -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",
Expand Down