mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
Remove destructuring in signatures (#16307)
This commit is contained in:
36
types/lestate/index.d.ts
vendored
36
types/lestate/index.d.ts
vendored
@@ -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;
|
||||
|
||||
@@ -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 })
|
||||
})
|
||||
});
|
||||
|
||||
1
types/lestate/tslint.json
Normal file
1
types/lestate/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
2
types/nvd3/index.d.ts
vendored
2
types/nvd3/index.d.ts
vendored
@@ -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.
|
||||
}
|
||||
|
||||
|
||||
2
types/stamplay-js-sdk/index.d.ts
vendored
2
types/stamplay-js-sdk/index.d.ts
vendored
@@ -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>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user