Skip to content

Commit

Permalink
chore: Types for sleep and definitely_posix
Browse files Browse the repository at this point in the history
  • Loading branch information
bencergazda committed Sep 9, 2021
1 parent d352b0c commit 1b59226
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ async function apply_loaders(raw_content: string, source_path: string, destinati
* Returns a Promise that resolves automatically after `ms`
* @param ms
*/
function sleep(ms) {
function sleep(ms: number) {
return new Promise(resolve => setTimeout(resolve, ms));
}

Expand All @@ -405,7 +405,7 @@ function sleep(ms) {
* @param p path string
* @see https://stackoverflow.com/a/63251716/3111787
*/
function definitely_posix(p) {
function definitely_posix(p: string) {
return p.split(path.sep).join(path.posix.sep);
}

Expand Down

0 comments on commit 1b59226

Please sign in to comment.