Skip to content

Commit

Permalink
Added another test for is-array
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpocock committed Feb 21, 2023
1 parent b69cf2e commit 831d679
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/tests/is-array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,11 @@ doNotExecute(() => {
type tests = [Expect<Equal<typeof arrOrString, string[]>>];
}
});

doNotExecute(() => {
let path: string | string[] = [];

const paths = Array.isArray(path) ? path : [path];

type tests = [Expect<Equal<typeof paths, string[]>>];
});

0 comments on commit 831d679

Please sign in to comment.