Skip to content

SCSS Property does not exist on type '{}' #188

Closed
@jerryc05

Description

@jerryc05
  1. enable "goToDefinition": true in tsconfig.json

  2. create a sample index.scss file look like this:

.classA {
  height: 100%;
  &>.classB {
    width: 100%;
  }
}
  1. in a typescript file, import the scss as import css from './index.scss'

  2. after import, only css.classA is valid. accessing css.classB gives

Property 'classB' does not exist on type 'typeof import("???/index.scss")'
  1. However, turning goToDefinition off makes classB valid, but I would like to keep it on and still be able to use css.classB

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions