From 0de2047e17a2201a5d159ae863eeea8db2c6b749 Mon Sep 17 00:00:00 2001 From: Brian Takita Date: Sat, 29 Apr 2023 03:07:01 -0400 Subject: [PATCH] push: push the error & continue if error.file is undefined (#36) this commit has no test...unsure how to create a reasonable fixture to replicate fixes https://github.com/ai/check-dts/issues/30 --- check.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/check.js b/check.js index 9bc9c68..cb0afbc 100644 --- a/check.js +++ b/check.js @@ -108,6 +108,10 @@ export async function check( // Unsupported files continue } + if (!error.file) { + push(error) + continue + } let { line, column } = location(error.file.text).toPoint(error.start) let expect = expects.find(j => { return error.file.fileName === j.fileName && line === j.line && !j.used