Closed jacobbogers closed 5 years ago
Why would this need to be JSPlugin
? we don't even have such a type.
Also, alpha 7 is outdated, please upgrade to the latest alpha and check if your problem still exists.
In typescript I am using the @types/jss with version "9.5.8"
I simple installed with npm i --save-dev @types/jss
if this outdated can you update the npm registry to the most current one
in the index.d.ts
is shows
`export function create(options?: Partial
and if you look up JSSOptions
it shows
export interface JSSOptions {
createGenerateClassName(): GenerateClassName;
plugins: ReadonlyArray<JSSPlugin>; // <--- JSSPlugin not Plugin
virtual: boolean;
insertionPoint: string | HTMLElement;
}
Yeah, so that's your problem. @types/jss
is incompatible with jss
v10. In v10 we moved the types so you don't need @types/jss
anymore.
Oh while you replied , I adjusted my original message))
I am not using explicit version numbers during npm i
, Is it possible for you to have the npm fetch the the correct one where everything is consistent
Just do npm install jss@next
and remove the @types/jss
dependency
Ok
Also for the plugins?
yes
Ok, works
I also noticed the new jss.create({ plugins }) needs an array of type plugins instead of functions creating plugins (options:Options) => Plugin
(Edited I provided more info) (edited) Should be
JSSPlugin
(edited) corrected for versions, the jss plugin used, the jss, and the @types/jssnpm
without explicitly specifiying any versions@types/jss
were all installed in the same timejss-plugin-camel-case
Used
npm i --save jss-plugin-camel-case
to install it, no explicit version specified Looking in thenode_modules
it installs version "10.0.0-alpha.7"The typescript index.d.ts of the
jss-plugin-camel-case
Versions (please complete the following information):