mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 10:25:42 +01:00
fixes website & adds editor.api.d.ts
This commit is contained in:
parent
36efbe07d9
commit
e1154473c0
7 changed files with 26 additions and 24 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue