mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
fix lint
This commit is contained in:
Vendored
+10
-48
@@ -4,51 +4,13 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
declare module 'react-blessed' {
|
||||
import * as React from 'react';
|
||||
import * as Blessd from 'blessed';
|
||||
import { Widgets, screen } from 'blessed';
|
||||
export type Callback = () => void | null | undefined;
|
||||
export type renderer = (
|
||||
c: JSX.Element, s: Widgets.Screen, callback?: Callback,
|
||||
) => React.Component<any, any> | null;
|
||||
export function render(
|
||||
c: JSX.Element, s: Widgets.Screen, callback?: Callback
|
||||
): React.Component<any, any> | null;
|
||||
export function createBlessedRenderer(b: typeof Blessd): renderer;
|
||||
}
|
||||
|
||||
// relation to blessed export widgets, prepare for next version of react-blessed
|
||||
declare namespace JSX {
|
||||
interface IntrinsicElements {
|
||||
'blessed-box': any,
|
||||
'blessed-text': any,
|
||||
'blessed-line': any,
|
||||
'blessed-scrollablebox': any,
|
||||
'blessed-scrollabletext': any,
|
||||
'blessed-bigtext': any,
|
||||
'blessed-list': any,
|
||||
'blessed-filemanager': any,
|
||||
'blessed-listtable': any,
|
||||
'blessed-listbar': any,
|
||||
'blessed-form': any,
|
||||
'blessed-input': any,
|
||||
'blessed-textarea': any,
|
||||
'blessed-textbox': any,
|
||||
'blessed-button': any,
|
||||
'blessed-checkbox': any,
|
||||
'blessed-radioset': any,
|
||||
'blessed-radiobutton': any,
|
||||
'blessed-table': any,
|
||||
'blessed-prompt': any,
|
||||
'blessed-question': any,
|
||||
'blessed-message': any,
|
||||
'blessed-loading': any,
|
||||
'blessed-log': any,
|
||||
'blessed-progressbar': any,
|
||||
'blessed-program': any,
|
||||
'blessed-terminal': any,
|
||||
'blessed-layout': any,
|
||||
'blessed-escape': any,
|
||||
}
|
||||
}
|
||||
import * as React from 'react';
|
||||
import { Widgets, screen } from 'blessed';
|
||||
export type Callback = () => void | null | undefined;
|
||||
export type renderer = (
|
||||
c: JSX.Element, s: Widgets.Screen, callback?: Callback,
|
||||
) => React.Component<any, any> | null;
|
||||
export function render(
|
||||
c: JSX.Element, s: Widgets.Screen, callback?: Callback
|
||||
): React.Component<any, any> | null;
|
||||
export function createBlessedRenderer(bls: any): renderer;
|
||||
|
||||
@@ -125,8 +125,10 @@ class Progress extends Component<any, any> {
|
||||
super(props);
|
||||
const interval: NodeJS.Timer = setInterval(() => {
|
||||
const { progress } = this.state;
|
||||
if (this.state.progress >= 100)
|
||||
return clearInterval(interval);
|
||||
if (this.state.progress >= 100) {
|
||||
clearInterval(interval);
|
||||
return;
|
||||
}
|
||||
this.setState({
|
||||
progress: progress + 1,
|
||||
});
|
||||
|
||||
Vendored
+34
@@ -0,0 +1,34 @@
|
||||
// relation to blessed export widgets, prepare for next version of react-blessed
|
||||
declare namespace JSX {
|
||||
interface IntrinsicElements {
|
||||
'blessed-box': any;
|
||||
'blessed-text': any;
|
||||
'blessed-line': any;
|
||||
'blessed-scrollablebox': any;
|
||||
'blessed-scrollabletext': any;
|
||||
'blessed-bigtext': any;
|
||||
'blessed-list': any;
|
||||
'blessed-filemanager': any;
|
||||
'blessed-listtable': any;
|
||||
'blessed-listbar': any;
|
||||
'blessed-form': any;
|
||||
'blessed-input': any;
|
||||
'blessed-textarea': any;
|
||||
'blessed-textbox': any;
|
||||
'blessed-button': any;
|
||||
'blessed-checkbox': any;
|
||||
'blessed-radioset': any;
|
||||
'blessed-radiobutton': any;
|
||||
'blessed-table': any;
|
||||
'blessed-prompt': any;
|
||||
'blessed-question': any;
|
||||
'blessed-message': any;
|
||||
'blessed-loading': any;
|
||||
'blessed-log': any;
|
||||
'blessed-progressbar': any;
|
||||
'blessed-program': any;
|
||||
'blessed-terminal': any;
|
||||
'blessed-layout': any;
|
||||
'blessed-escape': any;
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,7 @@
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"react.d.ts",
|
||||
"react-blessed-tests.tsx"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user