Skip to content

Commit 4fcfd98

Browse files
Fix type error with modifier (#367)
Closes #268. Co-authored-by: Evan Jacobs <[email protected]>
1 parent 49a0572 commit 4fcfd98

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"@babel/preset-env": "^7.0.0",
3131
"@babel/preset-react": "^7.0.0",
3232
"@testing-library/react": "^9.3.2",
33+
"@types/styled-components": "^5.1.11",
3334
"babel-core": "^7.0.0-bridge.0",
3435
"babel-eslint": "^10.0.1",
3536
"babel-jest": "^26.0.0",

typings/index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Plugin, NewPlugin } from 'pretty-format'
2+
import { css } from 'styled-components'
23

34
declare global {
45
namespace jest {
@@ -11,7 +12,7 @@ declare global {
1112

1213
interface Options {
1314
media?: string;
14-
modifier?: string;
15+
modifier?: string | ReturnType<typeof css>;
1516
supports?: string;
1617
}
1718

yarn.lock

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1627,6 +1627,14 @@
16271627
dependencies:
16281628
"@types/node" "*"
16291629

1630+
"@types/hoist-non-react-statics@*":
1631+
version "3.3.1"
1632+
resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f"
1633+
integrity sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==
1634+
dependencies:
1635+
"@types/react" "*"
1636+
hoist-non-react-statics "^3.3.0"
1637+
16301638
"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1":
16311639
version "2.0.3"
16321640
resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz#4ba8ddb720221f432e443bd5f9117fd22cfd4762"
@@ -1710,6 +1718,15 @@
17101718
resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c"
17111719
integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==
17121720

1721+
"@types/styled-components@^5.1.11":
1722+
version "5.1.11"
1723+
resolved "https://registry.yarnpkg.com/@types/styled-components/-/styled-components-5.1.11.tgz#a3a1bc0f2cdad7318d8ce219ee507e6b353503b5"
1724+
integrity sha512-u8g3bSw9KUiZY+S++gh+LlURGraqBe3MC5I5dygrNjGDHWWQfsmZZRTJ9K9oHU2CqWtxChWmJkDI/gp+TZPQMw==
1725+
dependencies:
1726+
"@types/hoist-non-react-statics" "*"
1727+
"@types/react" "*"
1728+
csstype "^3.0.2"
1729+
17131730
"@types/testing-library__dom@*":
17141731
version "7.5.0"
17151732
resolved "https://registry.yarnpkg.com/@types/testing-library__dom/-/testing-library__dom-7.5.0.tgz#e0a00dd766983b1d6e9d10d33e708005ce6ad13e"
@@ -4118,7 +4135,7 @@ hermes-profile-transformer@^0.0.6:
41184135
dependencies:
41194136
source-map "^0.7.3"
41204137

4121-
hoist-non-react-statics@^3.0.0:
4138+
hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.3.0:
41224139
version "3.3.2"
41234140
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45"
41244141
integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==

0 commit comments

Comments
 (0)