Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
111 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import * as _ from '../../src/Array' | ||
import { NonEmptyArray } from '../../src/NonEmptyArray' | ||
|
||
declare const ns: Array<number> | ||
declare const ss: Array<string> | ||
declare const nens: NonEmptyArray<number> | ||
declare const sess: NonEmptyArray<string> | ||
declare const tns: Array<[number, string]> | ||
declare const netns: NonEmptyArray<[number, string]> | ||
|
||
// | ||
// zip | ||
// | ||
|
||
_.zip(ns, ss) // $ExpectType [number, string][] | ||
_.zip(nens, sess) // $ExpectType NonEmptyArray<[number, string]> | ||
|
||
// | ||
// zipWith | ||
// | ||
|
||
_.zipWith(ns, ss, (n, s) => [n, s] as const) // $ExpectType (readonly [number, string])[] | ||
_.zipWith(nens, sess, (n, s) => [n, s] as const) // $ExpectType NonEmptyArray<readonly [number, string]> | ||
|
||
// | ||
// unzip | ||
// | ||
|
||
_.unzip(tns) // $ExpectType [number[], string[]] | ||
_.unzip(netns) // $ExpectType [NonEmptyArray<number>, NonEmptyArray<string>] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import * as _ from '../../src/ReadonlyArray' | ||
import { ReadonlyNonEmptyArray } from '../../src/ReadonlyNonEmptyArray' | ||
|
||
declare const ns: ReadonlyArray<number> | ||
declare const ss: ReadonlyArray<string> | ||
declare const nens: ReadonlyNonEmptyArray<number> | ||
declare const sess: ReadonlyNonEmptyArray<string> | ||
declare const tns: ReadonlyArray<readonly [number, string]> | ||
declare const netns: ReadonlyNonEmptyArray<readonly [number, string]> | ||
|
||
// | ||
// zip | ||
// | ||
|
||
_.zip(ns, ss) // $ExpectType readonly (readonly [number, string])[] | ||
_.zip(nens, sess) // $ExpectType ReadonlyNonEmptyArray<readonly [number, string]> | ||
|
||
// | ||
// zipWith | ||
// | ||
|
||
_.zipWith(ns, ss, (n, s) => [n, s] as const) // $ExpectType readonly (readonly [number, string])[] | ||
_.zipWith(nens, sess, (n, s) => [n, s] as const) // $ExpectType ReadonlyNonEmptyArray<readonly [number, string]> | ||
|
||
// | ||
// unzip | ||
// | ||
|
||
_.unzip(tns) // $ExpectType readonly [readonly number[], readonly string[]] | ||
_.unzip(netns) // $ExpectType readonly [ReadonlyNonEmptyArray<number>, ReadonlyNonEmptyArray<string>] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters