Skip to content

Commit ae6d831

Browse files
committed
add typings
1 parent c3cc921 commit ae6d831

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+5469
-17167
lines changed

lib/modules/alert/actions.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use strict";
22
var types_1 = require('./types');
33
function alertOpen(alert) {
4-
return function (dispatch, getState) {
4+
return function (dispatch) {
55
dispatch({ type: types_1.ALERT_OPEN, payload: { alert: alert } });
66
};
77
}

lib/modules/route/actions.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
var types_1 = require('./types');
33
function routeSet(route) {
44
return function (dispatch, getState) {
5-
if (getState.route !== route) {
5+
if (getState().route !== route) {
66
dispatch({ type: types_1.ROUTE_SET, payload: { route: route } });
77
}
88
return;

src/modules/alert/actions.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {ALERT_CLOSE, ALERT_OPEN, ALERT_REPLAY} from './types';
22

3-
export function alertOpen(alert: Object): ReduxThunk.ThunkInterface {
4-
return (dispatch, getState): void => {
3+
export function alertOpen(alert: Object): Redux.ThunkAction<any, any, {}> {
4+
return (dispatch) => {
55
dispatch({ type: ALERT_OPEN, payload: { alert } });
66
};
77
}

src/modules/route/actions.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import {ROUTE_SET} from './types';
22

3-
export function routeSet(route: string): ReduxThunk.ThunkInterface {
3+
export function routeSet(route: string):
4+
Redux.ThunkAction<any, {route: string}, {}> {
45
return (dispatch, getState) => {
5-
if (getState.route !== route) {
6+
if (getState().route !== route) {
67
dispatch({ type: ROUTE_SET, payload: { route } });
78
}
89
return;

src/modules/setup/actions.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
import {SETUP_PACKAGE, SETUP_VERIFY} from './types';
22

3-
export function setupVerify(): ReduxThunk.ThunkInterface {
3+
export function setupVerify():
4+
Redux.ThunkAction<any, {dir: string, packageJson: PackageJson}, {}> {
45
return (dispatch, getState): void => {
56
dispatch(setupPackage());
67
const {dir, packageJson} = getState();
78
dispatch({ type: SETUP_VERIFY, payload: { dir, packageJson } });
89
};
910
}
1011

11-
export function setupPackage(): ReduxThunk.ThunkInterface {
12+
export function setupPackage():
13+
Redux.ThunkAction<any, {dir: string}, {}> {
1214
return (dispatch, getState): void => {
1315
const {dir} = getState();
1416
dispatch({ type: SETUP_PACKAGE, payload: { dir } });

src/typings.json

+11-1
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,28 @@
22
"name": "builder-coderoad",
33
"dependencies": {},
44
"globalDependencies": {
5+
"assertion-error": "registry:dt/assertion-error#1.0.0+20160316155526",
56
"atom": "registry:dt/atom#0.0.0+20160505173316",
7+
"emissary": "registry:dt/emissary#0.0.0+20160317120654",
68
"es6-promise": "registry:dt/es6-promise#0.0.0+20160614011821",
9+
"es6-shim": "registry:dt/es6-shim#0.31.2+20160602141504",
10+
"jquery": "registry:dt/jquery#1.10.0+20160704162008",
711
"marked": "registry:dt/marked#0.0.0+20160325085301",
812
"material-ui": "registry:dt/material-ui#0.15.1+20160824122606",
13+
"mixto": "registry:dt/mixto#0.0.0+20160317120654",
914
"node": "registry:dt/node#6.0.0+20160831021119",
15+
"pathwatcher": "registry:dt/pathwatcher#0.0.0+20160317120654",
16+
"q": "registry:dt/q#0.0.0+20160613154756",
1017
"react": "registry:dt/react#0.14.0+20160829191040",
1118
"react-dom": "registry:dt/react-dom#0.14.0+20160412154040",
1219
"react-redux": "registry:dt/react-redux#4.4.0+20160724070751",
1320
"redux": "registry:dt/redux#3.5.2+20160703092728",
1421
"redux-form": "registry:dt/redux-form#4.0.3+20160803140805",
1522
"redux-logger": "registry:dt/redux-logger#2.6.0+20160619033847",
1623
"redux-thunk": "registry:dt/redux-thunk#2.1.0+20160703120921",
17-
"reselect": "registry:dt/reselect#2.0.2+20160319031821"
24+
"reselect": "registry:dt/reselect#2.0.2+20160319031821",
25+
"space-pen": "registry:dt/space-pen#0.0.0+20160316155526",
26+
"status-bar": "registry:dt/status-bar#0.0.0+20160317120654",
27+
"text-buffer": "registry:dt/text-buffer#0.0.0+20160317120654"
1828
}
1929
}
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
declare module 'atom-plugin-command-line' {
22
export default function commandLine(root: string, commands?: string): Promise<string>;
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Generated by typings
2+
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/56295f5058cac7ae458540423c50ac2dcf9fc711/assertion-error/assertion-error.d.ts
3+
declare module 'assertion-error' {
4+
class AssertionError implements Error {
5+
constructor(message: string, props?: any, ssf?: Function);
6+
name: string;
7+
message: string;
8+
showDiff: boolean;
9+
stack: string;
10+
}
11+
export = AssertionError;
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"resolution": "main",
3+
"tree": {
4+
"src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/56295f5058cac7ae458540423c50ac2dcf9fc711/assertion-error/assertion-error.d.ts",
5+
"raw": "registry:dt/assertion-error#1.0.0+20160316155526",
6+
"typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/56295f5058cac7ae458540423c50ac2dcf9fc711/assertion-error/assertion-error.d.ts"
7+
}
8+
}
+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// Generated by typings
2+
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/emissary/emissary.d.ts
3+
declare namespace Emissary {
4+
interface IEmitterStatic extends Mixto.IMixinStatic {
5+
new ():IEmitter;
6+
}
7+
8+
interface IEmitter {
9+
on(eventNames:string, handler:Function):any; // return value type are Signal
10+
once(eventName:string, handler:Function):any; // return value type are Signal
11+
signal(eventName:string):void;
12+
behavior(eventName:string, initialValue:any):void;
13+
emit(eventName:string, ...args:any[]):void;
14+
off(eventNames:string, handler:Function):void;
15+
pauseEvents(eventNames:string):void;
16+
resumeEvents(eventNames:string):void;
17+
incrementSubscriptionCount(eventName:string):number;
18+
decrementSubscriptionCount(eventName:string):number;
19+
getSubscriptionCount(eventName:string):number;
20+
hasSubscriptions(eventName:string):boolean;
21+
}
22+
23+
interface ISubscriberStatic extends Mixto.IMixinStatic {
24+
new ():ISubscriber;
25+
}
26+
27+
interface ISubscriber {
28+
subscribeWith(eventEmitter:any, methodName:string, args:any):ISubscription;
29+
30+
addSubscription(subscription:any):ISubscription;
31+
32+
subscribe(eventEmitterOrSubscription:any, ...args:any[]):ISubscription;
33+
34+
subscribeToCommand(eventEmitter:any, ...args:any[]):ISubscription;
35+
36+
unsubscribe(object?:any):any;
37+
}
38+
39+
interface ISubscriptionStatic {
40+
new (emitter: any, eventNames:string, handler:Function):ISubscription;
41+
}
42+
43+
interface ISubscription extends IEmitter {
44+
cancelled:boolean;
45+
46+
off():any;
47+
}
48+
}
49+
50+
declare module "emissary" {
51+
var Emitter:Emissary.IEmitterStatic;
52+
var Subscriber:Emissary.ISubscriberStatic;
53+
var Signal:Function; // TODO
54+
var Behavior:Function; // TODO
55+
var combine:Function; // TODO
56+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"resolution": "main",
3+
"tree": {
4+
"src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/emissary/emissary.d.ts",
5+
"raw": "registry:dt/emissary#0.0.0+20160317120654",
6+
"typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/emissary/emissary.d.ts"
7+
}
8+
}

0 commit comments

Comments
 (0)