Created
July 27, 2016 13:08
-
-
Save frontdevops/4e8a91497f3dddf9bd7a75d4c08d7ed1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Где-то в декларации прописано так: | |
declare var require: <T>(s :string) => T; | |
// Есть интерфейсы | |
interface ICSSModule { | |
font :string; | |
background :string; | |
} | |
interface ComponentButton extends ICSSModule { | |
width? :string | number; | |
height? :string | number; | |
border? :string; | |
} | |
// Используем так | |
const style = require<ComponentButton>('button.css'); | |
style. // ⇦ Вот тут нет подсказок для ICSSModule |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment