-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
* Feature types changes (#4) * Up * Added mocha.opts file with recursive param * Replaced chainable with resolvable * Added SimpleResolvable class * Fixed TS Errors on build Build error when `yarn build`: node_modules/@types/graphql/utilities/introspectionQuery.d.ts(96,13): error TS2456: Type alias 'IntrospectionTypeRef' circularly references itself. node_modules/@types/mocha/index.d.ts(19,16): error TS2694: Namespace 'Mocha' has no exported member 'Interface'. node_modules/@types/mocha/index.d.ts(25,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'reporter' must be of type 'any', but here has type 'string | ReporterConstructor'. node_modules/@types/mocha/index.d.ts(40,15): error TS2451: Cannot redeclare block-scoped variable 'mocha'. node_modules/@types/mocha/index.d.ts(41,15): error TS2451: Cannot redeclare block-scoped variable 'describe'. node_modules/@types/mocha/index.d.ts(42,15): error TS2451: Cannot redeclare block-scoped variable 'xdescribe'. node_modules/@types/mocha/index.d.ts(44,15): error TS2451: Cannot redeclare block-scoped variable 'context'. node_modules/@types/mocha/index.d.ts(46,15): error TS2451: Cannot redeclare block-scoped variable 'suite'. node_modules/@types/mocha/index.d.ts(47,15): error TS2451: Cannot redeclare block-scoped variable 'it'. node_modules/@types/mocha/index.d.ts(48,15): error TS2451: Cannot redeclare block-scoped variable 'xit'. node_modules/@types/mocha/index.d.ts(50,15): error TS2451: Cannot redeclare block-scoped variable 'test'. node_modules/@types/mocha/index.d.ts(51,15): error TS2451: Cannot redeclare block-scoped variable 'specify'. node_modules/@types/mocha/index.d.ts(56,6): error TS2300: Duplicate identifier 'MochaDone'. node_modules/@types/mocha/index.d.ts(75,15): error TS2300: Duplicate identifier 'Mocha'. node_modules/@types/mocha/index.d.ts(90,28): error TS2694: Namespace 'Mocha' has no exported member 'Interface'. node_modules/@types/mocha/index.d.ts(128,19): error TS2300: Duplicate identifier 'Mocha'. node_modules/@types/mocha/index.d.ts(332,5): error TS2300: Duplicate identifier 'export='. typings/globals/mocha/index.d.ts(29,13): error TS2451: Cannot redeclare block-scoped variable 'mocha'. typings/globals/mocha/index.d.ts(30,13): error TS2451: Cannot redeclare block-scoped variable 'describe'. typings/globals/mocha/index.d.ts(31,13): error TS2451: Cannot redeclare block-scoped variable 'xdescribe'. typings/globals/mocha/index.d.ts(33,13): error TS2451: Cannot redeclare block-scoped variable 'context'. typings/globals/mocha/index.d.ts(35,13): error TS2451: Cannot redeclare block-scoped variable 'suite'. typings/globals/mocha/index.d.ts(36,13): error TS2451: Cannot redeclare block-scoped variable 'it'. typings/globals/mocha/index.d.ts(37,13): error TS2451: Cannot redeclare block-scoped variable 'xit'. typings/globals/mocha/index.d.ts(39,13): error TS2451: Cannot redeclare block-scoped variable 'test'. typings/globals/mocha/index.d.ts(40,13): error TS2451: Cannot redeclare block-scoped variable 'specify'. typings/globals/mocha/index.d.ts(45,11): error TS2300: Duplicate identifier 'MochaDone'. typings/globals/mocha/index.d.ts(62,15): error TS2300: Duplicate identifier 'Mocha'. typings/globals/mocha/index.d.ts(110,19): error TS2300: Duplicate identifier 'Mocha'. typings/globals/mocha/index.d.ts(229,5): error TS2300: Duplicate identifier 'export='. * Updated Readme Added tests instruction and contributing section * 1.0.5
- Loading branch information
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
import { ResolverFunction, ChainedFunction } from './../resolvers.types'; | ||
export declare const chain: <R>(resolvers: ResolverFunction<any>[]) => ChainedFunction<any> | ChainedFunction<R>; | ||
import { ResolverFunction, PureResolverFunction } from './../types'; | ||
export declare const chain: <R = any>(resolvers: ResolverFunction<any>[]) => PureResolverFunction<R>; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { ResolverFunction, ResolversMap, Resolvers, ChainedFunction } from './../resolvers.types'; | ||
import { ResolverFunction, ResolversMap, Resolvers, PureResolverFunction } from './../types'; | ||
export interface ProtectArgs<R> { | ||
it?: ResolverFunction<R>; | ||
all?: ResolversMap; | ||
using: Resolvers; | ||
} | ||
export declare const protect: <R>({ it, all, using }: ProtectArgs<R>) => ResolversMap | ChainedFunction<any>; | ||
export declare const protect: <R>({ it, all, using }: ProtectArgs<R>) => ResolversMap | PureResolverFunction<any>; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
export * from './apis'; | ||
export * from './resolvers.types'; | ||
export * from './types'; | ||
export * from './resolvers.check'; | ||
export * from './Chainable'; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
export declare const isArray: (resolvers: any) => boolean; | ||
export declare const isApplyArgs: (args: any) => boolean; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { ResolverFunction, PureResolverFunction } from './Resolvers'; | ||
export interface Resolvable<R = any> { | ||
evaluate(root: any, args: {}, context: {}, info: any): Promise<R>; | ||
} | ||
export declare function isResolvable(object: any): object is Resolvable; | ||
export declare type ResolvableSequenceArgs = Array<Resolvable | ResolverFunction>; | ||
export declare class ResolvableSequence<R = any> { | ||
resolvables: Resolvable<R>[]; | ||
constructor(resolvers: ResolvableSequenceArgs); | ||
resolved(): PureResolverFunction<R>; | ||
} | ||
export declare class SimpleResolvable<R = any> implements Resolvable<R> { | ||
private resolver; | ||
constructor(resolver: ResolverFunction<R>); | ||
evaluate(root: any, args: {}, context: {}, info: any): Promise<R>; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { GraphQLResolveInfo } from 'graphql'; | ||
export interface ResolverFunction<Result = any> { | ||
(root: any, args: {}, context: {}, info: GraphQLResolveInfo): Promise<Result> | Result | never; | ||
} | ||
export interface PureResolverFunction<FinalResult = any> extends ResolverFunction<FinalResult> { | ||
(root: any, args: {}, context: {}, info: GraphQLResolveInfo | any): Promise<FinalResult>; | ||
} | ||
export declare type Resolvers = Array<ResolverFunction>; | ||
export interface ResolversMap { | ||
[key: string]: ResolverFunction; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './Resolvables'; | ||
export * from './Resolvers'; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--require ts-node/register | ||
--recursive | ||
src/**/*.spec.ts |