Skip to content

Use unknown as the default any type rather than literal {} #17

Closed
@chrisui

Description

@chrisui

Context

Referencing the following code:

new DeclarationBlock({}).asKind('type').withName('definedNonNullAny').withContent('{}').string,

Currently, with a custom scalar Date: Date (see graphql-codegen scalarMap config) we end up with type errors such as "{} is missing properties from Date toLocaleString, ..." etc.

Proposal

Replace {} with unknown would allow consumers of this library to cast as neccessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions