anu-verzum 1.14.0 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,7 +8,7 @@ export declare abstract class Component<P extends Record<string, any> = Props, S
|
|
|
8
8
|
static isAnuComponent?: boolean;
|
|
9
9
|
constructor(props: P, context?: Record<string, any>);
|
|
10
10
|
setState(partialState?: Partial<S> | ((prevState: S, prevProps: P) => S)): void;
|
|
11
|
-
abstract render(): AnuElement | AnuElement[] | null | undefined;
|
|
11
|
+
abstract render(): AnuElement | AnuElement[] | string | number | null | undefined;
|
|
12
12
|
componentDidMount(): void;
|
|
13
13
|
componentDidUpdate(_prevProps: P, _prevState: S): void;
|
|
14
14
|
componentWillUnmount(): void;
|
package/dist/core/elements.d.ts
CHANGED
|
@@ -12,11 +12,11 @@ export type Props = {
|
|
|
12
12
|
export type Ref<T> = {
|
|
13
13
|
current: T | null;
|
|
14
14
|
};
|
|
15
|
-
export type FunctionComponent<P extends Props = Props> = (props: P) => AnuElement | AnuElement[] | null;
|
|
15
|
+
export type FunctionComponent<P extends Props = Props> = (props: P) => AnuElement<any, any> | AnuElement<any>[] | null;
|
|
16
16
|
export type ComponentConstructor<P extends Props = Props> = new (props: P, context?: Record<string, any>) => any;
|
|
17
17
|
export type ElementType = string | FunctionComponent | ComponentConstructor;
|
|
18
|
-
export type AnuElement = {
|
|
19
|
-
type:
|
|
20
|
-
props:
|
|
18
|
+
export type AnuElement<P = Props, T extends ElementType = ElementType> = {
|
|
19
|
+
type: T;
|
|
20
|
+
props: P;
|
|
21
21
|
};
|
|
22
22
|
export declare const createElement: (type: ElementType, config: Props | null, ...args: any[]) => AnuElement;
|
package/dist/index.d.ts
CHANGED
|
@@ -146,10 +146,10 @@ export { store, ServerAPI, Utils, Connector, Feature, History, Intl };
|
|
|
146
146
|
export type { AbbreviateNumberOptions } from './core/components/Intl';
|
|
147
147
|
declare global {
|
|
148
148
|
namespace JSX {
|
|
149
|
-
interface Element extends AnuElement {
|
|
149
|
+
interface Element extends AnuElement<any, any> {
|
|
150
150
|
}
|
|
151
151
|
interface ElementClass {
|
|
152
|
-
render(): AnuElement | AnuElement[] | null | undefined;
|
|
152
|
+
render(): AnuElement | AnuElement[] | string | number | null | undefined;
|
|
153
153
|
}
|
|
154
154
|
interface ElementAttributesProperty {
|
|
155
155
|
props: Record<string, unknown>;
|
package/package.json
CHANGED