Skip to content

Commit

Permalink
update initial tuple to readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
rawpixel-vincent committed Apr 7, 2024
1 parent cab0b5f commit 4644a73
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "string-literal-list",
"version": "1.24.0",
"version": "1.25.0",
"description": "an array for string literal",
"main": "stringList.cjs",
"module": "stringList.js",
Expand Down
6 changes: 4 additions & 2 deletions strict.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
export declare function stringList<
TT extends readonly string[] = readonly never[],
>(...strings: TT): StringLiteralList.list.IStringList<TT, false, false>;
>(
...strings: TT
): StringLiteralList.list.IStringList<readonly [...TT], false, false>;

export declare function sl<TT extends readonly string[] = readonly never[]>(
...strings: TT
): StringLiteralList.list.IStringList<TT, false, false>;
): StringLiteralList.list.IStringList<readonly [...TT], false, false>;
6 changes: 4 additions & 2 deletions stringList.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
export declare function stringList<
TT extends readonly string[] = readonly never[],
>(...strings: TT): StringLiteralList.list.IStringList<TT, true, false>;
>(
...strings: TT
): StringLiteralList.list.IStringList<readonly [...TT], true, false>;

export declare function sl<TT extends readonly string[] = readonly never[]>(
...strings: TT
): StringLiteralList.list.IStringList<TT, true, false>;
): StringLiteralList.list.IStringList<readonly [...TT], true, false>;
8 changes: 6 additions & 2 deletions stringListFunction.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@

export declare function stringListMutable<
TT extends readonly string[] = readonly never[],
>(...list: TT): StringLiteralList.list.IStringList<TT, true, false>;
>(
...list: TT
): StringLiteralList.list.IStringList<readonly [...TT], true, false>;

export declare function stringListReadonly<
TT extends readonly string[] = readonly never[],
>(...list: TT): StringLiteralList.list.IStringList<TT, false, false>;
>(
...list: TT
): StringLiteralList.list.IStringList<readonly [...TT], false, false>;

0 comments on commit 4644a73

Please sign in to comment.