Remove destructuring in signatures (#16307)

This commit is contained in:
Andy
2017-05-03 15:31:34 -07:00
committed by GitHub
parent 9c78cc64c2
commit 43d498dfa2
5 changed files with 25 additions and 28 deletions

View File

@@ -1,25 +1,21 @@
// Type definitions for LeState v0.1.3
// Type definitions for LeState 0.1
// Project: https://github.com/LeTools/LeState
// Definitions by: Hadrian Oliveira <https://github.com/thelambdaparty/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare let LeState : {
createState: (props?: {
initialState: {};
}) => {
set(newValue: {}): [{
id: number;
state: {};
}];
get(): any;
insert(newValue: {}): void;
getDescription(): {};
createListener({ id, selector, force }: {
id: number;
selector: (state :any) => {};
force?: boolean;
}): void;
};
};
export interface LeState {
set(newValue: {}): [{
id: number;
state: {};
}];
get(): any;
insert(newValue: {}): void;
getDescription(): {};
createListener(options: {
id: number;
selector(state: any): {};
force?: boolean;
}): void;
}
export = LeState;
export function createState(props?: { initialState: {} }): LeState;

View File

@@ -1,19 +1,19 @@
import LeState = require("lestate");
let State = LeState.createState()
let State = LeState.createState();
State.set({
test : {}
})
});
let currentState = State.get()
let currentState = State.get();
State.insert({
test : {}
})
});
let currentDescription = State.getDescription()
let currentDescription = State.getDescription();
State.createListener({
id : 0,
selector : state => ({ test : state.test })
})
});

View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }

View File

@@ -67,7 +67,7 @@ declare namespace nv {
}
interface Nvd3TooltipStatic {
show([left, top]: [number, number], content: string, gravity?: string): void; //todo sort out use on nv.tooltip.
show(leftTop: [number, number], content: string, gravity?: string): void; //todo sort out use on nv.tooltip.
cleanup(): void; //todo sort out use on nv.tooltip.
}

View File

@@ -16,7 +16,7 @@ declare namespace Stamplay {
unset(property: string): void;
fetch(id: any): Promise<any>;
destroy(): Promise<any>;
save({}?): Promise<any>;
save(arg?: any): Promise<any>; // TODO: Don't know what this is supposed to be.
upVote(): Promise<any>;
}