-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
Milestone
Description
π Search Terms
reportNonexistentProperty references js string literal
π Version & Regression Information
- This is the behavior in every version I tried
β― Playground Link
N/A
π» Code
/// <reference path="fourslash.ts" />
// @strict: true
// @allowJs: true
// @checkJs: true
// @filename: ./src/parser-input.js
//// export default () => {
//// let input;
////
//// const parserInput = {};
////
//// parserInput.currentChar = () => input.charAt(parserInput.i);
////
//// parserInput.end = () => {
//// const isFinished = parserInput.i >= input.length;
////
//// return {
//// isFinished,
//// furthest: parserInput.i,
//// };
//// };
////
//// return parserInput;
//// };
// @filename: ./src/parser.js
//// import getParserInput from "./parser-input";
////
//// const Parser = function Parser(context, imports, fileInfo, currentIndex) {
//// currentIndex = currentIndex || 0;
//// let parsers;
//// const parserInput = getParserInput();
////
//// return {
//// parserInput,
//// parsers: (parsers = {
//// variable: function () {
//// let name;
////
//// if (parserInput.currentChar() === "/*1*/@") {
//// return name[1];
//// }
//// },
//// }),
//// };
//// };
////
//// export default Parser;
verify.baselineFindAllReferences("1");π Actual behavior
it crashes like here: #60293 (comment)
π Expected behavior
it shouldnt crash
Additional information about the issue
related to #55889 , this issue here can be fixed by wrapping reportNonexistentProperty with addLazyDiagnostic but the other can't since non-LSP scenarios always go through checkSourceFileWithEagerDiagnostics