Ir al contenido

Broad Wildcard Import (ARCH3192)

Esta página aún no está disponible en tu idioma.

Key typescript.quality.namespace-import · Severity warning · Category quality

Wildcard (* as) imports pollute the namespace, obscure which symbol comes from where, and hinder tree-shaking. Only the symbols actually used should be imported.

import * as utils from "./utils";
const slug = utils.slugify(utils.trim(title));
import { slugify, trim } from "./utils";
const slug = slugify(trim(title));

Import the specific symbols you need with named imports.