Skip to content

Proposal: ///<reference path=""/> should allow for accessing DefinitelyTyped URLs #6465

@SetTrend

Description

@SetTrend

Creating TypeScript files using build/runtime environments, like Node, Gulp, etc., I regularly find myself referencing public repositories.

Currently it looks like the /// <reference path="" /> syntax only allows for referencing local files (at least I couldn't find any information of IRIs being supported, and TSC claims File not Found error when using a DefinitelyTyped URL).

But this results in a requirement to deliver .d.ts files of public repositories along with the project and to keep their relative position in sync with locally generated .d.ts files. (See SetTrend/TS18N failing project for reference).

So I propose to allow to use IRIs for reference:

/// <reference path="https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/node/node.d.ts" />

Metadata

Metadata

Assignees

No one assigned

    Labels

    Out of ScopeThis idea sits outside of the TypeScript language design constraintsSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions