Skip to content

Commit b9bb040

Browse files
fix(esbuild): Remove unnecessary @ts-expect-error annotation
The `@ts-expect-error` comment was suppressing a TypeScript error that is no longer necessary. This was likely due to a previous type mismatch or incorrect assumption about the `browserslist` module's default export. With updated dependencies and improved type definitions, the explicit error suppression is no longer required. Removing it improves code clarity and ensures better type safety by allowing TypeScript to properly validate the usage of `browserslist.default('defaults')`. This change affects the ESBuild configuration where browser targets are derived from `browserslist`.
1 parent 79f454a commit b9bb040

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

Configuration/ESBuild.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ export default {
3434
],
3535
define: {
3636
"process.env.VERSION_PACKAGE": `'${(await (await import("@playform/build/Target/Function/JSON.js")).default("package.json"))?.version}'`,
37-
"process.env.TARGETS": JSON.stringify((await import("lightningcss")).browserslistToTargets(
38-
// @ts-expect-error
39-
(await import("browserslist")).default("defaults"))),
37+
"process.env.TARGETS": JSON.stringify((await import("lightningcss")).browserslistToTargets((await import("browserslist")).default("defaults"))),
4038
},
4139
};

Target/Variable/CSS/lightningcss.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)