diff --git a/package.json b/package.json index 0a592abdfd7..0deb425169e 100644 --- a/package.json +++ b/package.json @@ -4,5 +4,8 @@ "version": "1.0.0", "description": "", "scripts": {}, - "license": "MIT" + "license": "MIT", + "devDependencies": { + "astro": "^2.1.7" + } } diff --git a/packages/starbook/package.json b/packages/starbook/package.json index 8c26d184b50..c1b53375c1e 100644 --- a/packages/starbook/package.json +++ b/packages/starbook/package.json @@ -15,6 +15,7 @@ "exports": { ".": "./index.ts", "./schema": "./schema.ts", + "./types": "./types.ts", "./index.astro": "./index.astro" }, "peerDependencies": { diff --git a/packages/starbook/types.ts b/packages/starbook/types.ts new file mode 100644 index 00000000000..638755df1f3 --- /dev/null +++ b/packages/starbook/types.ts @@ -0,0 +1 @@ +export { StarbookConfig } from './utils/user-config'; diff --git a/packages/starbook/virtual.d.ts b/packages/starbook/virtual.d.ts new file mode 100644 index 00000000000..ce241051b2f --- /dev/null +++ b/packages/starbook/virtual.d.ts @@ -0,0 +1,4 @@ +declare module 'virtual:starbook/user-config' { + const Config: import('./types').StarbookConfig; + export default Config; +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b60cea61315..8cf6c0c2da3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3,7 +3,10 @@ lockfileVersion: 5.4 importers: .: - specifiers: {} + specifiers: + astro: ^2.1.7 + devDependencies: + astro: 2.1.7 docs: specifiers: diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000000..fbc2f5fc190 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "astro/tsconfigs/strictest" +}