Skip to content

Commit

Permalink
Publish declaration in package
Browse files Browse the repository at this point in the history
  • Loading branch information
alexstrat committed Feb 6, 2018
1 parent c5ab398 commit 210734c
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 2 deletions.
11 changes: 11 additions & 0 deletions dist/context.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export interface ContextData {
models: Object;
user: Object;
}
export declare const createExpressContext: (data: any, res: any) => Context;
export declare class Context {
models: Object;
user: Object;
constructor(data: ContextData);
dispose(): void;
}
1 change: 1 addition & 0 deletions dist/helper.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export declare const combineResolvers: (resolvers?: any[]) => any;
5 changes: 5 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { usePromise } from './promise';
import { combineResolvers } from './helper';
import { createExpressContext } from './context';
import { createResolver } from './resolver';
export { usePromise, combineResolvers, createExpressContext, createResolver };
2 changes: 2 additions & 0 deletions dist/promise.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export declare const usePromise: (pLib: any) => void;
export declare const getPromise: () => PromiseConstructor;
1 change: 1 addition & 0 deletions dist/resolver.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export declare const createResolver: (resFn: any, errFn: any) => (root: any, args?: {}, context?: {}) => Promise<any>;
3 changes: 3 additions & 0 deletions dist/util.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export declare const isFunction: (fn: any) => boolean;
export declare const Promisify: (fn: any) => (...args: any[]) => Promise<{}>;
export declare const isNotNullOrUndefined: (val: any) => boolean;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.3",
"description": "Expressive and composable resolvers for Apollostack's GraphQL server Edit",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"test": "make test"
},
Expand Down
2 changes: 1 addition & 1 deletion src/context.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as assert from 'assert';
interface ContextData {
export interface ContextData {
models: Object;
user: Object;
};
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"target": "es2015",
"module": "commonjs",
"moduleResolution": "node",
"declaration": true,
"sourceMap": true,
"removeComments": false,
"noImplicitAny": false,
"allowJs": true,
"outDir": "./dist"
},
"include": [
Expand Down

0 comments on commit 210734c

Please sign in to comment.