Skip to content

Conversation

@HishamAli81
Copy link

Added the "types" property in the package.json to include the type declarations: https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#including-declarations-in-your-npm-package.

This solves the issue when running tsc and encountering the error related to #43:

$ tsc --noEmit --project tsconfig.app.json
../../../node_modules/.pnpm/[email protected]/node_modules/graphql-fields-list/index.ts(294,27): error TS2538: Type 'undefined' cannot be used as an index type.
../../../node_modules/.pnpm/[email protected]/node_modules/graphql-fields-list/index.ts(295,26): error TS2538: Type 'undefined' cannot be used as an index type.
../../../node_modules/.pnpm/[email protected]/node_modules/graphql-fields-list/index.ts(299,33): error TS2538: Type 'undefined' cannot be used as an index type.
../../../node_modules/.pnpm/[email protected]/node_modules/graphql-fields-list/index.ts(318,9): error TS2322: Type 'SkipValue | undefined' is not assignable to type 'SkipValue'.
  Type 'undefined' is not assignable to type 'SkipValue'.
../../../node_modules/.pnpm/[email protected]/node_modules/graphql-fields-list/index.ts(331,13): error TS2322: Type 'SkipValue | undefined' is not assignable to type 'SkipValue'.
  Type 'undefined' is not assignable to type 'SkipValue'.
../../../node_modules/.pnpm/[email protected]/node_modules/graphql-fields-list/index.ts(390,17): error TS2345: Argument of type 'MapResultKey | undefined' is not assignable to parameter of type 'MapResultKey'.
  Type 'undefined' is not assignable to type 'MapResultKey'.
../../../node_modules/.pnpm/[email protected]/node_modules/graphql-fields-list/index.ts(593,17): error TS2322: Type 'string | undefined' is not assignable to type 'string'.
  Type 'undefined' is not assignable to type 'string'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants