Skip to content

Commit

Permalink
chore: generate driver declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Apr 14, 2021
1 parent c42054f commit 1421306
Show file tree
Hide file tree
Showing 4 changed files with 586 additions and 573 deletions.
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"server*"
],
"scripts": {
"build": "siroc build && mkdist --src src/drivers --dist drivers --format cjs",
"build": "siroc build && mkdist --src src/drivers --dist drivers --format cjs -d",
"dev": "jest --watch",
"demo": "vite demo",
"lint": "eslint --ext .ts .",
Expand All @@ -49,27 +49,27 @@
},
"devDependencies": {
"@nuxtjs/eslint-config-typescript": "latest",
"@types/ioredis": "^4.22.3",
"@types/ioredis": "latest",
"@types/jest": "latest",
"@types/jsdom": "^16.2.6",
"@types/mri": "^1.1.0",
"@types/jsdom": "latest",
"@types/mri": "latest",
"@types/node": "latest",
"@types/ws": "^7.4.0",
"@vitejs/plugin-vue": "^1.1.5",
"@vue/compiler-sfc": "^3.0.5",
"destr": "^1.1.0",
"doctoc": "^2.0.0",
"@types/ws": "latest",
"@vitejs/plugin-vue": "latest",
"@vue/compiler-sfc": "latest",
"destr": "latest",
"doctoc": "latest",
"eslint": "latest",
"jest": "latest",
"jiti": "latest",
"jsdom": "^16.4.0",
"mkdist": "^0.1.2",
"monaco-editor": "^0.23.0",
"jsdom": "latest",
"mkdist": "latest",
"monaco-editor": "latest",
"siroc": "latest",
"standard-version": "latest",
"ts-jest": "latest",
"typescript": "latest",
"vite": "^2.0.5",
"vite": "latest",
"vue": "^3.0.5"
}
}
6 changes: 4 additions & 2 deletions src/drivers/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import type { Driver } from '../../types'
import type { Driver } from 'unstorage'

export function defineDriver<T = any>(factory: (opts?: T) => Driver) {
type DriverFactory<T> = (opts?: T) => Driver

export function defineDriver<T = any>(factory: DriverFactory<T>): DriverFactory<T> {
return factory
}
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"types": [
"node",
"jest"
]
],
"paths": {
"unstorage": [ "./src/types.ts" ]
}
},
"include": [
"src"
Expand Down
Loading

0 comments on commit 1421306

Please sign in to comment.