Skip to content

Wrong type for headers dynamic #6

@baloran

Description

@baloran

A type error is triggered on building when using dynamic headers.

Type error: Type '{ 'Prismic-Ref': () => Promise<string>; Authorization: string; Accept: string; 'Content-Type': string; }' is not assignable to type 'ISimpleQLHeaders'.
  Types of property ''Prismic-Ref'' are incompatible.
    Type '() => Promise<string>' is not assignable to type 'string | DynamicHeaderValue'.
      Type '() => Promise<string>' is not assignable to type 'DynamicHeaderValue'.
        Type 'Promise<string>' is not assignable to type 'string | DynamicHeaderValue'.
          Type 'Promise<string>' is not assignable to type 'DynamicHeaderValue'.
            Type 'Promise<string>' provides no match for the signature '(): string | DynamicHeaderValue'

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions