From 021a0fcfade5b24291da5a5d465f2e748cabb98d Mon Sep 17 00:00:00 2001 From: Mark Koester Date: Tue, 26 May 2020 11:12:33 -0400 Subject: [PATCH] Ignore typescript errors in generated file The @ts-ignore flag only suppresses errors on the following line. @ts-nocheck should be used to ignore all errors in the file. --- lib/generate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/generate.js b/lib/generate.js index e9e88664..bc806ede 100644 --- a/lib/generate.js +++ b/lib/generate.js @@ -188,7 +188,7 @@ var output = "// Generated automatically by nearley, version " + parser.version + "\n"; output += "// http://github.com/Hardmath123/nearley\n"; output += "// Bypasses TS6133. Allow declared but unused functions.\n"; - output += "// @ts-ignore\n"; + output += "// @ts-nocheck\n"; output += "function id(d: any[]): any { return d[0]; }\n"; output += parser.customTokens.map(function (token) { return "declare var " + token + ": any;\n" }).join("") output += parser.body.join('\n');