Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Question: how to use the project with TypeScript? #2545

Open
Assignees
Labels
DocumentationImprovements, additions, or changes to documentation. QuestionGeneral question. TypeScriptIssue involves or relates to TypeScript.
@dcsan

Description

Description

I'm tying to use some of the libs with TS and it's very unclear how to do this.

import * as ss from "@stdlib/nlp-sentencize"

gives an error:

This module can only be referenced with ECMAScript imports/exports by turning on the 'allowSyntheticDefaultImports' flag and referencing its default export.ts(2497)

so should i add that to a tsconfig ?

allowSyntheticDefaultImports: true

doesn't seem to help.

it seems most people write TS nowadays so a bit less of an onboarding brick wall would be helpful.

I searched the docs and can find no mention of how to import into a typescript project.

Related Issues

Related issues # , # , and # .

Questions

No.

Other

No.

Checklist

  • I have read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • The issue name begins with RFC:.

Metadata

Metadata

Labels

DocumentationImprovements, additions, or changes to documentation. QuestionGeneral question. TypeScriptIssue involves or relates to TypeScript.

Type

No type

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /