-
Notifications
You must be signed in to change notification settings - Fork 12.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type guard by deep property #38839
Type guard by deep property #38839
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -307,7 +307,7 @@ namespace ts.server { | |
this.compilerOptions.types = []; | ||
break; | ||
default: | ||
Debug.assertNever(projectService.serverMode); | ||
throw new Error("never"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, should still be |
||
} | ||
|
||
this.setInternalCompilerOptionsForEmittingJsFiles(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -798,7 +798,7 @@ namespace ts.server { | |
); | ||
break; | ||
default: | ||
Debug.assertNever(this.projectService.serverMode); | ||
throw new Error("never"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, should still be |
||
} | ||
} | ||
|
||
|
@@ -1516,6 +1516,7 @@ namespace ts.server { | |
// filter handles case when 'projects' is undefined | ||
projects = filter(projects, p => p.languageServiceEnabled && !p.isOrphan()); | ||
if (!ignoreNoProjectError && (!projects || !projects.length) && !symLinkedProjects) { | ||
// @ts-ignore | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, can't have a |
||
this.projectService.logErrorForScriptInfoNotFound(args.file ?? args.projectFileName); | ||
return Errors.ThrowNoProject(); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1525,7 +1525,7 @@ namespace ts.FindAllReferences { | |
addClassStaticThisReferences(referenceLocation, search, state); | ||
break; | ||
default: | ||
Debug.assertNever(state.specialSearchKind); | ||
throw new Error("never"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, should still be |
||
} | ||
|
||
// Use the parent symbol if the location is commonjs require syntax on javascript files only. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad merge? Pretty sure the fallback should still be here.