Skip to content

When near-api-js updates TypeScript dependency, my project breaks #368

@chadoh

Description

@chadoh

Describe the bug
Recently (maybe a3e587b74), NAJ updated its TypeScript dependency. This caused the lib/index.d.ts file to use syntax that was only supported by TS version greater than 3.8:

 Syntax not supported by TS version < 3.8
 export * as aliasName from './path/to/the/file'

It took partners using an older version of TS a long time to track down and fix the issue.

NAJ should play more nicely with everyone relying on an older TS version, and give expectable deprecation warnings when support for a newer TS version is added.

Additional context
It looks like [this is a known frustration with TypeScript](microsoft/TypeScript#31907) that should ideally be fixed by the TypeScript team. However, the TS team did provide a rudimentary means for library authors to control this in September 2018: microsoft/TypeScript#26568

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Pretty importantbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions