diff --git a/types/styled-jsx/css.d.ts b/types/styled-jsx/css.d.ts index 588956c57e..bb50756afc 100644 --- a/types/styled-jsx/css.d.ts +++ b/types/styled-jsx/css.d.ts @@ -1,4 +1,8 @@ -type Tag = (chunks: TemplateStringsArray, ...args: any[]) => string; +type Tag = { + (chunks: TemplateStringsArray, ...args: any[]): string; + global: (chunks: TemplateStringsArray, ...args: any[]) => string; + resolve: (chunks: TemplateStringsArray, ...args: any[]) => { className: string; styles: string }; +}; declare let css: Tag; export = css; diff --git a/types/styled-jsx/styled-jsx-tests.tsx b/types/styled-jsx/styled-jsx-tests.tsx index 09883d8df6..d1b9033966 100644 --- a/types/styled-jsx/styled-jsx-tests.tsx +++ b/types/styled-jsx/styled-jsx-tests.tsx @@ -26,6 +26,29 @@ const withSeparatedCSS = ( ); +const globalCSS = css.global`body { margin: 0; }`; +const withGlobalCSS = ( +