diff --git a/packages/taro-runner-utils/package.json b/packages/taro-runner-utils/package.json index 0ee4840b5009..a7387079fa2b 100644 --- a/packages/taro-runner-utils/package.json +++ b/packages/taro-runner-utils/package.json @@ -3,6 +3,7 @@ "version": "2.0.0-beta.6", "description": "Taro runner utilities.", "main": "dist/index.js", + "types": "types/index.d.ts", "files": [ "dist", "types" diff --git a/packages/taro-runner-utils/src/scss.ts b/packages/taro-runner-utils/src/scss.ts index 403d7bd35605..381fcaa38a19 100644 --- a/packages/taro-runner-utils/src/scss.ts +++ b/packages/taro-runner-utils/src/scss.ts @@ -56,8 +56,8 @@ export async function getBundleContent(resource: string | string[], return result } -export async function getSassLoaderOption( - { sass, sassLoaderOption }: T +export async function getSassLoaderOption( + { sass, sassLoaderOption }: BuildConfig ): Promise { sassLoaderOption = sassLoaderOption || {} diff --git a/packages/taro-runner-utils/tsconfig.json b/packages/taro-runner-utils/tsconfig.json index 254c7e6bffe6..375e5735387b 100644 --- a/packages/taro-runner-utils/tsconfig.json +++ b/packages/taro-runner-utils/tsconfig.json @@ -5,7 +5,7 @@ "alwaysStrict": true, "baseUrl": ".", "declaration": true, - "declarationDir": "types/taro-runner-utils", + "declarationDir": "types", "experimentalDecorators": true, "module": "CommonJS", "moduleResolution": "node", @@ -22,8 +22,7 @@ "traceResolution": false }, "include": [ - "./src", - "./types" + "./src" ], "exclude": [ "./src/__tests__" diff --git a/packages/taro-runner-utils/types/scss.d.ts b/packages/taro-runner-utils/types/scss.d.ts index 79fb84146dba..46eb192c99b4 100644 --- a/packages/taro-runner-utils/types/scss.d.ts +++ b/packages/taro-runner-utils/types/scss.d.ts @@ -20,5 +20,5 @@ interface BuildConfig { */ export declare function getBundleResult(url: string, projectDirectory?: string | undefined): Promise; export declare function getBundleContent(resource: string | string[], projectDirectory?: string | undefined): Promise; -export declare function getSassLoaderOption({ sass, sassLoaderOption }: T): Promise; +export declare function getSassLoaderOption({ sass, sassLoaderOption }: BuildConfig): Promise; export default getSassLoaderOption;