Skip to content

Commit

Permalink
🐛 fix export-types
Browse files Browse the repository at this point in the history
  • Loading branch information
frostime committed Dec 3, 2024
1 parent 84af329 commit fab3cb5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion public/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ interface ICustomView {
* @param dv - DataView instance, might be empty while validating process
*/
use: (dv?: IDataView) => {
render: (container: HTMLElement, ...args: any[]) => void; //Create the user custom view.
render: (container: HTMLElement, ...args: any[]) => void | string | HTMLElement; //Create the user custom view.
dispose?: () => void; // Unmount hook for the user custom view.
},
alias?: string[]; // Alias name for the custom view
Expand Down
6 changes: 6 additions & 0 deletions scripts/export-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ import path from 'path';

let outputDir = './public';

import { fileURLToPath } from 'url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
process.chdir(path.join(__dirname, '..'));

const tsc = `tsc --declaration --emitDeclarationOnly --skipLibCheck --target ES2022 --project tsconfig.json --outDir ./types --noEmitOnError false --stripInternal`;

await exec(tsc);
Expand Down

0 comments on commit fab3cb5

Please sign in to comment.