Skip to content

Commit

Permalink
chore: improve types a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
joneff committed Nov 28, 2022
1 parent 1eff9eb commit 23bd6fc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/transformers/json-theme-transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const JsonThemeTransformer : CliTransformer = {

function __jsonTransformer(jsonFile) {
const json = JSON.parse(fs.readFileSync(jsonFile, 'utf-8'));
const sassContent = [];
const sassContent : string[] = [];
let groups;

if (Array.isArray(json)) {
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/sass-inline-transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function transformFile( file: string, outFile: string, options: CliTransformOpti
trimCwd(CWD, outFile)
);

const result = baka.compile( file, { cwd: _cwd } );
const result = baka.compile( file, <baka.CompileOptions> { cwd: _cwd } );

writeFile( outFile, result.content );
}
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"moduleResolution": "node",
"isolatedModules": true,
"esModuleInterop": true,
"declaration": false
"noEmit": true,
"declaration": false,
"emitDeclarationOnly": false
},
"include": [
"src/**/*.ts"
Expand Down
7 changes: 7 additions & 0 deletions types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ declare type BuildStageEntry = ConfigStageEntry & CliBuildOptions;
declare type BundleStageEntry = ConfigStageEntry & CliBundleOptions;
// #endregion

// #region OutputOptions
declare type OutputOptions = {
path: string;
filename: string;
}
// #endregion

declare module 'sass-build' {
export function sassCompile(file: string, options?: CliBuildOptions): string;
export function sassCompileString(source: string, options?: CliBuildOptions): string;
Expand Down

0 comments on commit 23bd6fc

Please sign in to comment.