ITADN

TypeScript types are broken?

#346OpenFunctionPoint 创建于 2026-02-21
F
FunctionPointcommented
In the current version 3.5.1, using VSCode latest these import statements: ``` import * as mariadb from "mariadb"; import { createConnection as mdCreateConnection } from "mariadb"; ``` Both give this error now: ``` node_modules/mariadb/types/index.d.ts:26:15 - error TS2846: A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file './share.js' instead? ``` The offending line in index.d.ts is: `export * from './share.d.ts';` PS I'm using plain VSCode without ohter build tools.
2 条评论