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

Commit

Permalink
Revert TypeScript 2.4.1 (#546)
Browse files Browse the repository at this point in the history
* Revert "Fix #519 - Upgrade to TypeScript 2.4.1 (#535)"

This reverts commit f3ed138.

* Bump back TS version for now, due to regression in language services
  • Loading branch information
extr0py authored Jul 21, 2017
1 parent 25ee3a1 commit a8f731c
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 21 deletions.
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, ServerRunOptions } from "./LanguageClient/LanguageClient"
import { InitializationParamsCreator, LanguageClient } from "./LanguageClient/LanguageClient"

import { Services } from "./Services"
import { Ui } from "./Ui"
Expand Down Expand Up @@ -87,8 +87,8 @@ export class Oni extends EventEmitter implements Oni.Plugin.Api {
})
}

public createLanguageClient(startOptions: ServerRunOptions, initializationParamsCreator: InitializationParamsCreator): LanguageClient {
return new LanguageClient(startOptions, initializationParamsCreator, this)
public createLanguageClient(initializationCommand: string, initializationParamsCreator: InitializationParamsCreator): LanguageClient {
return new LanguageClient(initializationCommand, 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.Component<IAutoCompletionProps, void>
return null
}

const containerStyle: React.CSSProperties = {
const containerStyle = {
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: React.CSSProperties = {
const windowStyle = {
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: React.CSSProperties = {
const markerStyle = {
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 @@ -28,7 +28,7 @@ class CursorRenderer extends React.Component<ICursorProps, void> {
const width = isNormalMode ? this.props.width : this.props.width / 4
const characterToShow = isNormalMode ? this.props.character : ""

const cursorStyle: React.CSSProperties = {
const cursorStyle = {
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.Component<ICursorLineRendererProps, void>

const width = this.props.width

const cursorStyle: React.CSSProperties = {
const cursorStyle = {
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/LiveEvalMarker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class LiveEvalMarker extends React.Component<ILiveEvalMarkerProps, void>

const cssClasses = classNames("live-eval-marker", { "evaluating": this._isEvaluating() }, { "error": this._hasError() })

const positionDivStyles: React.CSSProperties = {
const positionDivStyles = {
position: "absolute",
top: this.props.y.toString() + "px",
right: "0px",
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.Component<ILogsProps, void> {
// TODO copy details to clipboard
if (!this.props.visible) { return null }

const maxHeightStyle: React.CSSProperties = {
const maxHeightStyle = {
"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.Component<IQuickInfoProps, void> {

const openFromTop = this.props.openFromTop || false

const containerStyle: React.CSSProperties = {
const containerStyle = {
position: "absolute",
top: this.props.y.toString() + "px",
left: this.props.x.toString() + "px",
}

const innerCommonStyle: React.CSSProperties = {
const innerCommonStyle = {
"position": "absolute",
"opacity": this.props.visible ? 1 : 0,
"max-width": (document.body.offsetWidth - this.props.x - 40) + "px",
}

const openFromTopStyle: React.CSSProperties = {
const openFromTopStyle = {
...innerCommonStyle,
"top": "0px",
}

const openFromBottomStyle: React.CSSProperties = {
const openFromBottomStyle = {
...innerCommonStyle,
"bottom": "0px",
}

const innerStyle: React.CSSProperties = openFromTop ? openFromTopStyle : openFromBottomStyle
const innerStyle = 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 @@ -228,11 +228,11 @@ export class NeovimInstance extends EventEmitter implements INeovimInstance {
return this._neovim.request("nvim_eval", [expression])
}

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

public callFunction(functionName: string, args: any[]): Promise<void> {
public callFunction(functionName: string, args: any[]): Promise<any> {
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 @@ -151,7 +151,7 @@ declare namespace Oni {
editor: Editor
statusBar: StatusBar

registerLanguageService(languageService: LanguageService)
registerLanguageService(languageType: string, languageService: LanguageService)

clearHighlights(file: string, key: string)
setHighlights(file: string, key: string, highlights: SyntaxHighlight[])
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"omnisharp-client": "7.0.6",
"q": "1.4.1",
"tslint": "4.0.2",
"typescript": "2.4.1"
"typescript": "2.2.1"
},
"devDependencies": {
"@types/classnames": "0.0.32",
Expand All @@ -116,7 +116,7 @@
"@types/msgpack-lite": "0.1.4",
"@types/node": "6.0.48",
"@types/q": "0.0.32",
"@types/react": "15.0.30",
"@types/react": "0.14.48",
"@types/react-dom": "0.14.18",
"@types/react-redux": "4.4.38",
"@types/sinon": "1.16.32",
Expand Down Expand Up @@ -152,7 +152,7 @@
"sinon": "1.17.6",
"spectron": "3.6.2",
"style-loader": "0.13.1",
"ts-loader": "2.2.2",
"ts-loader": "1.2.2",
"vscode-jsonrpc": "3.3.1",
"vscode-languageserver-types": "3.3.0",
"wcwidth": "1.0.1",
Expand Down

0 comments on commit a8f731c

Please sign in to comment.