-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: declare module and fix conflict typing name (#805)
* fix: declare module and fix conflict typing name * update css, marco, style
- Loading branch information
Showing
4 changed files
with
43 additions
and
32 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
// Definitions by: @types/styled-jsx <https://www.npmjs.com/package/@types/styled-jsx> | ||
|
||
declare function css(chunks: TemplateStringsArray, ...args: any[]): JSX.Element | ||
declare namespace css { | ||
function global(chunks: TemplateStringsArray, ...args: any[]): JSX.Element | ||
function resolve( | ||
chunks: TemplateStringsArray, | ||
...args: any[] | ||
): { className: string; styles: JSX.Element } | ||
declare module 'styled-jsx/css' { | ||
function css(chunks: TemplateStringsArray, ...args: any[]): JSX.Element | ||
namespace css { | ||
export function global( | ||
chunks: TemplateStringsArray, | ||
...args: any[] | ||
): JSX.Element | ||
export function resolve( | ||
chunks: TemplateStringsArray, | ||
...args: any[] | ||
): { className: string; styles: JSX.Element } | ||
} | ||
export = css | ||
} | ||
export = css |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
declare namespace css { | ||
function resolve( | ||
chunks: TemplateStringsArray, | ||
...args: any[] | ||
): { | ||
className: string | ||
styles: JSX.Element | ||
declare module 'styled-jsx/marco' { | ||
namespace marco { | ||
function resolve( | ||
chunks: TemplateStringsArray, | ||
...args: any[] | ||
): { | ||
className: string | ||
styles: JSX.Element | ||
} | ||
} | ||
} | ||
|
||
export = css | ||
export = marco | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
export default function JSXStyle(props: any): null | ||
declare module 'styled-jsx/style' { | ||
export default function JSXStyle(props: any): null | ||
} |