fixes website & adds editor.api.d.ts

This commit is contained in:
Henning Dieterichs 2025-11-07 18:38:39 +01:00
parent 36efbe07d9
commit e1154473c0
No known key found for this signature in database
GPG key ID: 771381EFFDB9EC06
7 changed files with 26 additions and 24 deletions

View file

@ -58,12 +58,18 @@ export function mapModuleId(moduleId, newExt) {
return undefined;
}
/** @return {import('rollup').Plugin} */
export function dtsDeprecationWarning() {
/**
* @param {(moduleId: string) => boolean} [filter]
* @return {import('rollup').Plugin}
*/
export function dtsDeprecationWarning(filter) {
return {
name: 'add-dts-deprecation-warning',
generateBundle(options, bundle) {
for (const fileName in bundle) {
if (filter && !filter(fileName)) {
continue;
}
const file = bundle[fileName];
if (file.type === 'chunk' && fileName.endsWith('.d.ts')) {
let content = file.code.toString();