Skip to content

Add an option to skip ///<reference> check on d.ts files #9945

Closed
@saschanaz

Description

@saschanaz

Related SO: http://stackoverflow.com/questions/38567936/can-typescript-module-reference-chain-be-ignored

Some libraries have jQuery or node.js support on them and the corresponding type definitions have references to jquery.d.ts and node.d.ts.

Below is an example with jsdom.d.ts:

/// <reference path='../node/node.d.ts' />
/// <reference path='../jquery/jquery.d.ts' />

import EventEmitter = NodeJS.EventEmitter;
export interface VirtualConsole extends EventEmitter {
  sendTo(console: Console): VirtualConsole;
}

export function jQueryify(window: Window, jqueryUrl: string, callback: (window: Window, jquery: JQuery) => any): void;

I want to skip node.d.ts and jquery.d.ts as I don't need them. Just excluding those files from project raises TS2304 Cannot find name, TS2503 Cannot find namespace, and TS6053 File not found. --skipLibCheck on TS 2.0 Suppresses TS2304 and TS2503 but not TS6053, so I want a new option to also suppress TS6053.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs More InfoThe issue still hasn't been fully clarified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions