Skip to content

Definitely Not Versioned #7719

@snoopcheri

Description

@snoopcheri

What's the recommended way to find a TypeScript definition file for a specific version of a library and a specific TypeScript version? (for example a definition file for lodash v2.4.2, which compiles with TypeScript 1.5 and above)

What I know is the following:

Library Version

Some TypeScript definition files contain a comment at the beginning of the file, which mentions the version of the library this definition file refers to (e.g. AngularJS which specifies version 1.4+). Other TypeScript definition files don't mention anything in this respect - not even in the commit history.

Is there no reliable way to know what library version is covered by a TypeScript definition file?

TypeScript version

The DefinitelyTyped repository has branches starting with 0.8 up to 1.4.1. I'm assuming that this represents the TypeScript version itself. Unfortunately it ends with 1.4.1. Therefore I assumed that TypeScript definition files on the master branch are valid for TypeScript 1.4.1 and above. Unfortunately this is not always the case - there are TypeScript definition file which are only valid for TypeScript 1.6 and above.

Is there no reliable way to know what TypeScript version is required for a TypeScript definition file?

What we're doing at the moment is storing commit hashes of TypeScript definition files that compile with the TypeScript version we're using currently (v1.5.3). While this is a pain, it kinda works. But since we usually don't know, which library version the definition file is for, we're just hoping for the best. This doesn't sound like a promising and reliable process though.

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