Halvard
Halvard8mo ago

no-slow-types should not trigger on 'as const' objects

1 Reply
Deno AI Helper
Deno AI Helper8mo ago
I wasn't able to find the answer to your question in the official Deno documentation. However, based on the information you've provided, it seems like you're encountering an issue with a linting rule (no-slow-types) when using an as const assertion. Without the specific context of the error message or the ability to analyze the codebase, I can't provide a definitive solution. However, it's worth noting that the as const assertion in TypeScript is used to create a literal type which should not be a slow operation. If the linter is flagging this as a slow type, it could be a false positive or an issue with the linter's rule configuration. Please note that this advice is not based on the Deno documentation, and I would advise you to double-check the accuracy of this advice. It might be helpful to look into the linter configuration or consider filing an issue with the linter if you believe this is a bug.