Skip to content

Typescript bug when enable { strict: true } #37

Closed

Description

@yidingww

Environment

citty 0.1.11
nodejs 16
pnpm 8

Reproduction

https://stackblitz.com/edit/stackblitz-starters-kvn1gq?file=src%2Findex.ts

Describe the bug

Type 'ParsedArgs<ArgsDef>' is not assignable to type 'Record<"blah", string>'

image

TS config:

{
  "compilerOptions": {
    "target": "ESNext",
    "module": "ESNext",
    "moduleResolution": "Node",
    "esModuleInterop": true,
    "strict": true
  },
  "include": ["src"]
}

Additional context

The ts error is gone when i set strict to false in tsconfig.json

Logs

No response

Activity

  1. yidingww commented on May 30, 2023

    @yidingww
    ContributorAuthor

    @pi0 created a PR #38 to fix this 🙏🏻

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions