You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add an option to skip ///<reference> check on d.ts files #9945
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.
I'd image that any error originating form a lib definition will be surpressed with skipLibCheck. Don't want to ignore invalid file references that are not in the lib area.
Basarat Ali Syed (@basarat) I think some people still want to ensure that they have all required files so that they do not meet unexpected any type. Skipping type check means a dev trusts a type definition but does not always mean the dev self-trusts.
My recommendation is to not use /// <reference path=".." /> or /// <reference types=".." /> all together; instead use your tsconfig.json to control what files are picked and where they are found, there are a large set of options to enable this including types, typeRoots, paths, rootDirs, and baseUrl.
Reacted by Kagami Sascha Rosylight and Aluan Haddad
Activity
[-]Add an option to skip ///<reference> check[/-][+]Add an option to skip ///<reference> check on d.ts files[/+]basarat commentedon Jul 26, 2016
I'd image that any error originating form a lib definition will be surpressed with
skipLibCheck. Don't want to ignore invalid file references that are not in thelibarea.saschanaz commentedon Jul 26, 2016
Basarat Ali Syed (@basarat) I think some people still want to ensure that they have all required files so that they do not meet unexpected
anytype. Skipping type check means a dev trusts a type definition but does not always mean the dev self-trusts.I would like it, however :D
RyanCavanaugh commentedon Oct 24, 2016
Isn't this basically the same as
--noResolve?saschanaz commentedon Oct 25, 2016
#7432 (comment)
I want to resolve existing modules and ignore others. However, probably I will now just use
@typesand will not bother.mhegazy commentedon Oct 25, 2016
My recommendation is to not use
/// <reference path=".." />or/// <reference types=".." />all together; instead use your tsconfig.json to control what files are picked and where they are found, there are a large set of options to enable this includingtypes,typeRoots,paths,rootDirs, andbaseUrl.