t0n 0.1.16 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/import.ts +3 -2
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "t0n",
3
3
  "description": "Collection of elegant typescript resources for web artisans",
4
- "version": "0.1.16",
4
+ "version": "0.1.17",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
7
7
  "files": ["src"],
package/src/import.ts CHANGED
@@ -1,5 +1,6 @@
1
- export async function IMPORT(path: string, name: string): Promise<unknown>
2
- export async function IMPORT(path: string, ...name: string[]): Promise<Record<string, unknown>> {
1
+ export async function IMPORT<T extends unknown>(path: string): Promise<T>
2
+ export async function IMPORT<T extends unknown>(path: string, name: string): Promise<T>
3
+ export async function IMPORT<T extends unknown>(path: string, ...name: string[]): Promise<Record<string, T>> {
3
4
  if (process.platform === 'win32' && !path.startsWith('file://'))
4
5
  path = 'file://' + path
5
6