Skip to content

Commit

Permalink
fix(taro-runner-utils): 优化代码,修复找不到类型定义的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Garfield550 authored and luckyadam committed Dec 31, 2019
1 parent 201a991 commit 765c8de
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions packages/taro-runner-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions packages/taro-runner-utils/src/scss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ export async function getBundleContent(resource: string | string[],
return result
}

export async function getSassLoaderOption<T extends BuildConfig>(
{ sass, sassLoaderOption }: T
export async function getSassLoaderOption(
{ sass, sassLoaderOption }: BuildConfig
): Promise<LoaderOption> {
sassLoaderOption = sassLoaderOption || {}

Expand Down
5 changes: 2 additions & 3 deletions packages/taro-runner-utils/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"alwaysStrict": true,
"baseUrl": ".",
"declaration": true,
"declarationDir": "types/taro-runner-utils",
"declarationDir": "types",
"experimentalDecorators": true,
"module": "CommonJS",
"moduleResolution": "node",
Expand All @@ -22,8 +22,7 @@
"traceResolution": false
},
"include": [
"./src",
"./types"
"./src"
],
"exclude": [
"./src/__tests__"
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-runner-utils/types/scss.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ interface BuildConfig {
*/
export declare function getBundleResult(url: string, projectDirectory?: string | undefined): Promise<BundleResult>;
export declare function getBundleContent(resource: string | string[], projectDirectory?: string | undefined): Promise<string | undefined>;
export declare function getSassLoaderOption<T extends BuildConfig>({ sass, sassLoaderOption }: T): Promise<LoaderOption>;
export declare function getSassLoaderOption({ sass, sassLoaderOption }: BuildConfig): Promise<LoaderOption>;
export default getSassLoaderOption;

0 comments on commit 765c8de

Please sign in to comment.