regor 1.1.8 → 1.1.9
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.
- package/dist/regor.d.ts +3 -3
- package/package.json +1 -1
package/dist/regor.d.ts
CHANGED
|
@@ -196,13 +196,13 @@ export interface Component<TProps = Record<any, any>> {
|
|
|
196
196
|
}
|
|
197
197
|
export type OnMounted = () => void;
|
|
198
198
|
export type OnUnmounted = () => void;
|
|
199
|
-
export interface CreateComponentOptions {
|
|
199
|
+
export interface CreateComponentOptions<TProps = Record<any, any>> {
|
|
200
200
|
useInterpolation?: boolean;
|
|
201
201
|
config?: RegorConfig;
|
|
202
202
|
/**
|
|
203
203
|
* A function that defines the Regor context for the component.
|
|
204
204
|
*/
|
|
205
|
-
context?: (head: ComponentHead<
|
|
205
|
+
context?: (head: ComponentHead<TProps>) => IRegorContext;
|
|
206
206
|
inheritAttrs?: boolean;
|
|
207
207
|
/**
|
|
208
208
|
* Notes on component props:
|
|
@@ -223,7 +223,7 @@ export interface Scope<TRegorContext> {
|
|
|
223
223
|
[ScopeSymbol]: true;
|
|
224
224
|
}
|
|
225
225
|
export declare const createApp: <TRegorContext extends IRegorContext>(context: TRegorContext | Scope<TRegorContext>, template?: Template | string, config?: RegorConfig) => App<TRegorContext>;
|
|
226
|
-
export declare const createComponent: <TProps = Record<any, any>>(template: Template | string, options?:
|
|
226
|
+
export declare const createComponent: <TProps = Record<any, any>>(template: Template | string, options?: string[] | CreateComponentOptions<TProps>) => Component<TProps>;
|
|
227
227
|
export declare const toFragment: (json: JSONTemplate | JSONTemplate[], isSVG?: boolean, config?: RegorConfig) => DocumentFragment;
|
|
228
228
|
export declare const toJsonTemplate: (node: Element | Element[]) => JSONTemplate | JSONTemplate[];
|
|
229
229
|
export declare const addUnbinder: (node: Node, unbinder: Unbinder) => void;
|
package/package.json
CHANGED