Comments (2)
just edit return type on stylisRTLPlugin function in ~/node_modules/stylis-plugin-rtl/dist/stylis-rtl.d.ts like below:
declare function stylisRTLPlugin(element: MiddlewareParams[0], index: MiddlewareParams[1], children: MiddlewareParams[2], callback: MiddlewareParams[3]): string | undefined;
it works!
from stylis-plugin-rtl.
I patched it like this:
diff --git a/node_modules/stylis-plugin-rtl/types/stylis-rtl.d.ts b/node_modules/stylis-plugin-rtl/types/stylis-rtl.d.ts
index acb55fd..f7f8791 100644
--- a/node_modules/stylis-plugin-rtl/types/stylis-rtl.d.ts
+++ b/node_modules/stylis-plugin-rtl/types/stylis-rtl.d.ts
@@ -1,3 +1,10 @@
-declare function stylisRTLPlugin(context: number, content: string): string | undefined;
+import { StylisElement, StylisPluginCallback } from "@emotion/cache";
+
+declare function stylisRTLPlugin(
+ element: StylisElement,
+ index: number,
+ children: Array<StylisElement>,
+ callback: StylisPluginCallback
+): string | void
export default stylisRTLPlugin;
File in patches/stylis-plugin-rtl+2.0.2.patch
I copied the function definition from node_modules/@emotion/cache/types/index.d.ts
.
from stylis-plugin-rtl.
Related Issues (20)
- /* @noflip */ doesn't work. HOT 2
- Typescript issue (Uncaught TypeError: Cannot create property 'return' on number '-1') HOT 2
- Next.js + Emotion 11 + stylis-plugin-rtl 2 HOT 1
- Nested selectors not processed HOT 5
- Invalid types for v2.0.1 HOT 2
- noflip in JavaScript object HOT 4
- How to apply rtl styles conditionally? HOT 1
- ignore some styles HOT 1
- Getting 'A stylis plugin has been supplied that is not named.' HOT 2
- styles generated with @emotion/css are not flipped
- noflip no longer works for the class names
- stylis-plugin-rtl + source-map-loader = breakage HOT 34
- stylis-plugin-rtl cause malfanction in component HOT 1
- Source-map file not found HOT 17
- stylis-plugin-rtl causes linear-gradient problems HOT 1
- Typescript issue Types of parameters 'content' and 'selector' are incompatible.
- Ability to remove effect
- error in style-plugin-rtl
- Adding '&::placeholder' pseudo-element css selector breaks rtl HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stylis-plugin-rtl.