From d8a8e42dc25c5b721939854a7e01a01096220494 Mon Sep 17 00:00:00 2001 From: Anton Gilgur Date: Mon, 6 Jun 2022 20:04:02 -0400 Subject: [PATCH] optim: don't getScriptSnapshot when we already have the snapshot (#341) - the snapshot is set above, so no need to get it - also the snapshot from above is used below already, so this doesn't seem to be intentional - it originates from 2d330640316894752bae5ae64d94bc90652e4564 which similarly doesn't seem intentional --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index f096010..0dfd856 100644 --- a/src/index.ts +++ b/src/index.ts @@ -213,7 +213,7 @@ const typescript: PluginImpl = (options) => this.error(red(`failed to transpile '${id}'`)); } - const references = getAllReferences(id, servicesHost.getScriptSnapshot(id), parsedConfig.options); + const references = getAllReferences(id, snapshot, parsedConfig.options); return convertEmitOutput(output, references); });