Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.
In the 5.1.0 release the core.d.ts
files are corrupted and causes this error when used:
dist/cjs/core.d.ts(1893,1): error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.
The error happens because the original source line
export { version } from "../package.json";
is turned into
const version = "5.1.0";
by the json rollup plugin. This is fine for the regular build but for the typescript declaration it should be
declare const version: string;