Skip to content
This repository was archived by the owner on Oct 30, 2020. It is now read-only.

Need to have named export and interface declaration at the same time for using in isomorphic app #72

Open
budarin opened this issue Sep 11, 2018 · 0 comments

Comments

@budarin
Copy link

budarin commented Sep 11, 2018

I am developing an isomorphic app and style-loader/useable and use such operator

import appStyles from './app.css';
...
const css = process.env.__BROWSER__ ? appStyles.locals : appStyles;
...
if (process.env.__BROWSER__ ) {
    appStyles.use();
}
...
<div className={css.btn} />

so I need to have both declarations and also to have declared use and ``unuse``` methods

What is needed:
app.css

.hello {
    color: red;
}

app.css.d.ts

export interface IAppCss {
    hello: string;
}
export const hello: string;

export const locals: IAppCss;
export const use: Function;
export const unuse: Function;

Propose to add an option flag isomorphic: boolean (false by default)

@budarin budarin changed the title Need to have anmed export and interface declaration at the same time for using in isomorphic app Need to have named export and interface declaration at the same time for using in isomorphic app Sep 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant