-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add TypeScript typings builtin (#692)
- Loading branch information
1 parent
eb65f35
commit 4dd5c13
Showing
6 changed files
with
39 additions
and
2 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 +1,2 @@ | ||
package-lock=false | ||
save-exact = true |
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
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// 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 } | ||
} | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Definitions by: @types/styled-jsx <https://www.npmjs.com/package/@types/styled-jsx> | ||
|
||
import 'react' | ||
|
||
export * from './server' | ||
export * from './css' | ||
|
||
declare module 'react' { | ||
interface StyleHTMLAttributes<T> extends HTMLAttributes<T> { | ||
jsx?: boolean | ||
global?: boolean | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Definitions by: @types/styled-jsx <https://www.npmjs.com/package/@types/styled-jsx> | ||
|
||
import { ReactElement } from 'react' | ||
|
||
declare function flushToHTML(opts?: { nonce?: string }): string | ||
declare function flushToReact<T>(opts?: { | ||
nonce?: string | ||
}): Array<ReactElement<T>> | ||
|
||
export { flushToHTML } | ||
export default flushToReact |