update declaration file

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent 9e3e590935
commit 546743004b
5 changed files with 10 additions and 6 deletions

8
index.d.ts vendored
View File

@@ -1,4 +1,4 @@
declare module 'rollup-plugin-typescript' {
function typescript(): any;
export = typescript;
}
import { serializedNodeWithId } from './src/types';
export function snapshot(n: Document): serializedNodeWithId | null;
export function rebuild(n: serializedNodeWithId): Node | null;

View File

@@ -4,7 +4,7 @@
"description": "rrweb's component to take a snapshot of DOM, aka DOM serializer",
"main": "index.js",
"scripts": {
"test": "TS_NODE_FILES=true mocha -r ts-node/register test/**/*.ts",
"test": "TS_NODE_CACHE=false TS_NODE_FILES=true mocha -r ts-node/register test/**/*.ts",
"compile": "rollup --config"
},
"repository": {

4
test.d.ts vendored Normal file
View File

@@ -0,0 +1,4 @@
declare module 'rollup-plugin-typescript' {
function typescript(): any;
export = typescript;
}

View File

View File

@@ -11,5 +11,5 @@
},
"compileOnSave": true,
"exclude": ["test"],
"include": ["src", "index.d.ts"]
"include": ["src", "test.d.ts"]
}