question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Property 'prop' does not exist on type 'BaseRule'

See original GitHub issue

Describe the bug:

Code like this:

styleSheet.getRule('ruleName').prop('propName', propValue)

used to work perfectly fine with jss 9.x, but with v10.0.0 it fails with the following typescript error during build:

Property ‘prop’ does not exist on type ‘Rule’. Property ‘prop’ does not exist on type ‘BaseRule’.

Expected behavior:

No typescript compile error

Versions:

  • jss: 10.0.0
  • typescript: 3.6.4

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kofcommented, Nov 24, 2020

@tcoughlin3 totally send a PR, if you want to sync about how you could help on other issues, feel free to either just search for them or ping me in dm on gitter to find issues for you to work on

0reactions
tcoughlin3commented, Nov 24, 2020

@kof It seems like we just need to add a prop attribute to the Rule type definition somewhere around here: https://github.com/cssinjs/jss/blob/3c335148f5ba3dbe9d6fb017356f64a8fe6a3776/packages/jss/src/index.d.ts#L105-L116

I’m looking to help with some open source issues. I’m happy to create a PR for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Property 'props' does not exist on type '{}' (trying to get access ...
I'm doing custom Tabs component and ran into some problems. When I try to get access to the 'props' of children I get...
Read more >
Changelog and Migration Guide - Detekt
ArrayPrimitive rule is more precise but requires type resolution now. The deprecated customReports property of the Gradle plugin got removed. Deprecated ...
Read more >
Logarithmic Properties - Andrews University
To calculate logs to other bases, the change of base rule below (#4) should be used. It is only multiplication by a constant...
Read more >
Logarithm change of base rule intro (article) - Khan Academy
This is very useful for finding logarithms in the calculator! ... When using this property, you can choose to change the logarithm to...
Read more >
Revisiting Occurrence Typing - Archive ouverte HAL
The latter property is challenging because, as explained just above, our type assumptions are not only about variables but also about expressions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found