TypeStrong / dts-bundle

Export TypeScript .d.ts files as an external module definition
MIT License
308 stars 57 forks source link

Declaration for style files #76

Closed cupcakearmy closed 5 years ago

cupcakearmy commented 5 years ago

I think i'm not getting something right.

Basically I have this index.ts file:

import Button from './Components/Button'
import Card from './Components/Card'
import Flex from './Components/Flex'
import Input from './Components/Input'
import Switch from './Components/Switch'
import './index.styl'

export {
    Button,
    Flex,
    Card,
    Switch,
    Input,
}

and the output is

// Generated by dts-bundle v0.7.3
// Dependencies for this module:
//   ../react

declare module 'aspekto' {
    import Button from 'aspekto/Components/Button';
    import Card from 'aspekto/Components/Card';
    import Flex from 'aspekto/Components/Flex';
    import Input from 'aspekto/Components/Input';
    import Switch from 'aspekto/Components/Switch';
    import './index.styl';
    export { Button, Flex, Card, Switch, Input, };
}

...

The problem is that ./index.styl is not resolved and throws a TS2439: Import or export declaration in an ambient module declaration cannot reference module through relative module name.

Any ideas / suggestions?