diff --git a/package-lock.json b/package-lock.json index de13dfc..1575b2e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "string-literal-list", - "version": "1.23.0", + "version": "1.24.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "string-literal-list", - "version": "1.23.0", + "version": "1.24.0", "license": "MIT", "devDependencies": { "@types/node": "latest", diff --git a/package.json b/package.json index f2ca681..04ddb55 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "string-literal-list", - "version": "1.23.0", + "version": "1.24.0", "description": "an array for string literal", "main": "stringList.cjs", "module": "stringList.js", @@ -25,7 +25,7 @@ "default": "./strict.js" }, "./types.js": { - "default": "./types/index.js" + "default": "./types/index.d.ts" }, "./stringList.js": { "types": "./stringList.d.ts", diff --git a/types/generic.d.ts b/types/generic.d.ts index 171761e..1262d74 100644 --- a/types/generic.d.ts +++ b/types/generic.d.ts @@ -1,9 +1,8 @@ /// -import './index.js'; declare global { - export namespace StringLiteralList {} - export namespace StringLiteralList.generic { + namespace StringLiteralList {} + namespace StringLiteralList.generic { /** * Returns a tuple of the given length with the given type. */ diff --git a/types/index.d.ts b/types/index.d.ts index 5a705f0..282a648 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -7,9 +7,8 @@ import { ArrayInPlaceMutation } from '../StringLiteralList.js'; declare global { - export namespace StringLiteralList {} - - export namespace specs { + namespace StringLiteralList {} + namespace StringLiteralList.specs { /** * @description * These methods changes the array in place. @@ -79,4 +78,4 @@ declare global { } } -export { StringLiteralList as sl }; +export {}; diff --git a/types/list.d.ts b/types/list.d.ts index 95cd8ee..0e33acb 100644 --- a/types/list.d.ts +++ b/types/list.d.ts @@ -1,3 +1,9 @@ +/// +/// +/// +/// +/// + declare global { namespace StringLiteralList {} namespace StringLiteralList.list { diff --git a/types/record.d.ts b/types/record.d.ts index 8e59f17..80b0563 100644 --- a/types/record.d.ts +++ b/types/record.d.ts @@ -1,6 +1,7 @@ +/// declare global { - export namespace StringLiteralList {} - export namespace StringLiteralList.record { + namespace StringLiteralList {} + namespace StringLiteralList.record { export type StringRecord = Record< T, S diff --git a/types/string.d.ts b/types/string.d.ts index c021e4c..cfe8bda 100644 --- a/types/string.d.ts +++ b/types/string.d.ts @@ -1,10 +1,8 @@ /// /// -/// - declare global { - export namespace StringLiteralList {} - export namespace StringLiteralList.string { + namespace StringLiteralList {} + namespace StringLiteralList.string { /** * @credit @gustavoguichard * For the string manipulation types, diff --git a/types/tuple.d.ts b/types/tuple.d.ts index ff659ce..74d52a9 100644 --- a/types/tuple.d.ts +++ b/types/tuple.d.ts @@ -3,13 +3,8 @@ /// declare global { - export namespace StringLiteralList {} - /** - * @name tuple - * @description A tuple is a an immutable list of elements that infer the position and the length of its elements. - * This is useful to create an array that is used as an argument for a function that requires an ordered list of parameters. - */ - export namespace StringLiteralList.tuple { + namespace StringLiteralList {} + namespace StringLiteralList.tuple { export type GetTuplePositiveIndex< T extends readonly any[], I extends number,