Skip to content

Type PrecinctOptions is incorrect #161

Description

@jeremy-daley-kr

CC: @XhmikosR


In Typescript v6...

Trying to simply apply this example in a Typescript file doesn't allow type to be specified cleanly.

For example:

async function extractImportsFromFile(filePath: string): Promise<string[]> {
  const content = await readFile(filePath, 'utf-8');

  return precinct(content, { type: 'ts' });
}

The compiler gives the following error:

Image

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