forked from axiijs/axii
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobal.d.ts
37 lines (33 loc) · 1.12 KB
/
global.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Global compile-time constants
import { Component, JSXElement } from "@framework";
declare var __DEV__: boolean
declare global {
var __DEV__: boolean
namespace JSX {
interface IntrinsicElements {
fragment: { children?: JSXElement | JSXElement[] };
// allow arbitrary elements
// @ts-ignore suppress ts:2374 = Duplicate string index signature.
[name: string]: any
}
interface IntrinsicAttributes {
// [key: `$${string}`]: boolean;
// name an element inside component so it can be overwritten
as?: string
ref?: any
// for test usage
__this?: any
// pass props to an element inside component
[key: `$${string}`]: any
// FIXME type
// [key: `$${string}`]: {[key: string]: any}
// [key: `$${string}:${string}`]: any
}
interface ElementChildrenAttribute {
children: {}; // specify children name to use
}
type ElementClass = Component
type Element = JSXElement
}
}
export {}