Skip to content

Commit

Permalink
chore(build): make the type definition manually
Browse files Browse the repository at this point in the history
  • Loading branch information
vimcaw committed May 28, 2023
1 parent 29c0482 commit 572636d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/embedding/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"scripts": {
"dev": "vite",
"build:type": "dts-bundle-generator -o dist/index.d.ts src/index.tsx --external-imports three csstype --external-types --no-check",
"build": "vite build && pnpm build:type",
"build": "vite build",
"lint": "tsc",
"preview": "vite preview",
"preinstall": "npx only-allow pnpm",
Expand Down
15 changes: 15 additions & 0 deletions packages/embedding/public/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Properties as CSSProperties } from 'csstype';
import * as THREE from 'three';

export interface IInitProps {
three?: THREE;
panelStyle?: CSSProperties;
}

export declare class ThreeJsDevTools {
static USER_THREE: THREE;
static initialize(props?: IInitProps): void;
static destroy(): void;
}

export {};

0 comments on commit 572636d

Please sign in to comment.