Skip to content
This repository was archived by the owner on Jan 16, 2023. It is now read-only.

Commit 6685cc5

Browse files
author
Tobias
committed
Add definition file for typescript
1 parent c6a9eff commit 6685cc5

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
"url": "https://github.com/storybooks/require-context.macro/issues"
2222
},
2323
"homepage": "https://github.com/storybooks/require-context.macro#readme",
24+
"dependencies": {
25+
"@types/webpack-env": "^1.14.0"
26+
},
2427
"devDependencies": {
2528
"@babel/core": "^7.5.5",
2629
"@babel/preset-env": "^7.5.5",
@@ -34,5 +37,6 @@
3437
},
3538
"peerDependencies": {
3639
"babel-plugin-macros": "^2.4.2"
37-
}
40+
},
41+
"typings": "require-context.macro.d.ts"
3842
}

require-context.macro.d.ts

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
declare module 'require-context.macro' {
2+
const value: (
3+
path: string,
4+
deep: boolean,
5+
filter: RegExp,
6+
) => __WebpackModuleApi.RequireContext;
7+
export default value;
8+
}

yarn.lock

+5
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,11 @@
987987
resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e"
988988
integrity sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw==
989989

990+
"@types/webpack-env@^1.14.0":
991+
version "1.14.0"
992+
resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.14.0.tgz#8edfc5f8e6eae20eeed3ca0d02974ed4ee5e4efc"
993+
integrity sha512-Fv+0gYJzE/czLoRKq+gnXWr4yBpPM3tO3C8pDLFwqVKlMICQUq5OsxwwFZYDaVr7+L6mgNDp16iOcJHEz3J5RQ==
994+
990995
"@types/yargs@^12.0.2", "@types/yargs@^12.0.9":
991996
version "12.0.12"
992997
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-12.0.12.tgz#45dd1d0638e8c8f153e87d296907659296873916"

0 commit comments

Comments
 (0)