Skip to content

Commit

Permalink
types upd
Browse files Browse the repository at this point in the history
  • Loading branch information
Feverqwe committed Nov 25, 2023
1 parent 8a5bff4 commit 64709b4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/transform/plugins/images/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function convertSvg(
try {
let content: string;
if (envApi) {
content = envApi?.readFile(relative(root, path), 'utf8');
content = envApi?.readFile(relative(root, path), 'utf8') as string;
} else {
content = readFileSync(path, 'utf8');
}
Expand Down
2 changes: 1 addition & 1 deletion src/transform/utilsFS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function getFileTokens(path: string, state: StateCore, options: GetFileTo
}

if (envApi) {
content = envApi.readFile(relative(envApi.root, path), 'utf-8');
content = envApi.readFile(relative(envApi.root, path), 'utf-8') as string;
} else if (filesCache[path]) {
content = filesCache[path];
} else {
Expand Down
6 changes: 3 additions & 3 deletions src/transform/yfmlint/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ namespace yfmlint {
distRoot: string;
copyFile: (from: string, to: string) => void;
copyFileAsync: (from: string, to: string) => void;
writeFile: (to: string, data: string) => void;
writeFileAsync: (to: string, data: string) => void;
readFile: (path: string, encoding: BufferEncoding) => string;
writeFile: (to: string, data: string | Uint8Array) => void;
writeFileAsync: (to: string, data: string | Uint8Array) => void;
readFile: (path: string, encoding: BufferEncoding) => string | Uint8Array;
fileExists: (path: string) => boolean;
getFileVars: (path: string) => Record<string, string>;
}
Expand Down

0 comments on commit 64709b4

Please sign in to comment.