diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index c45caf86..1ea401c7 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -343,12 +343,19 @@ const composeIntoMap = (map: Map, atoms: (IAtom | IComposedAtom)[ } }; +declare global { + interface Window { + Deno: any; + } +} + export const createTokens = (tokens: T) => { return tokens; }; export const createCss = ( _config: T, - env: Window | null = typeof window === 'undefined' ? null : window + // Check against Deno env explicitly #199 + env: Window | null = typeof window === 'undefined' || window?.Deno ? null : window ): TCss => { // pre-checked config to avoid checking these all the time // tslint:disable-next-line