marko 5.25.12-next.0 → 5.25.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,5 @@
1
- "use strict";var nextComponentIdProvider = require("@internal/components-util")._B_;
1
+ "use strict";var nextComponentIdProvider =
2
+ require("@internal/components-util")._B_;
2
3
 
3
4
  function GlobalComponentsContext(out) {
4
5
  this.z_ = {};
package/index.d.ts CHANGED
@@ -25,7 +25,7 @@ declare global {
25
25
  [attr: PropertyKey]: unknown;
26
26
  }
27
27
 
28
- export type TemplateInput<Input = { [attr: PropertyKey]: any }> = Input & {
28
+ export type TemplateInput<Input> = Input & {
29
29
  $global?: Global;
30
30
  };
31
31
 
@@ -104,13 +104,8 @@ declare global {
104
104
  ? Params
105
105
  : never;
106
106
 
107
- export class Component<
108
- Input extends Record<PropertyKey, any> = Record<PropertyKey, any>,
109
- State extends undefined | null | Record<PropertyKey, any> =
110
- | undefined
111
- | null
112
- | Record<PropertyKey, any>
113
- > implements Emitter
107
+ export class Component<Input = unknown, State = unknown>
108
+ implements Emitter
114
109
  {
115
110
  /** A unique id for this instance. */
116
111
  public readonly id: string;
@@ -221,10 +216,7 @@ declare global {
221
216
  }
222
217
 
223
218
  /** The top level api for a Marko Template. */
224
- export abstract class Template<
225
- Input = { [attr: PropertyKey]: any },
226
- Return = unknown
227
- > {
219
+ export abstract class Template<Input = unknown, Return = unknown> {
228
220
  /** Creates a Marko compatible output stream. */
229
221
  createOut(): Out;
230
222
 
@@ -248,6 +240,15 @@ declare global {
248
240
  }
249
241
  ): Marko.Out<Marko.Component>;
250
242
 
243
+ /** Asynchronously render the template in buffered mode. */
244
+ abstract render(
245
+ input: Marko.TemplateInput<Input>,
246
+ cb?: (
247
+ err: Error | null,
248
+ result: Marko.RenderResult<Marko.Component>
249
+ ) => void
250
+ ): Marko.Out<Marko.Component>;
251
+
251
252
  /** Synchronously render the template. */
252
253
  abstract renderSync(
253
254
  input: Marko.TemplateInput<Input>
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "5.25.12-next.0",
3
+ "version": "5.25.13",
4
4
  "license": "MIT",
5
5
  "description": "UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.",
6
6
  "dependencies": {
7
- "@marko/compiler": "^5.27.8-next.0",
8
- "@marko/translator-default": "^5.25.8-next.0",
7
+ "@marko/compiler": "^5.27.8",
8
+ "@marko/translator-default": "^5.25.8",
9
9
  "app-module-path": "^2.2.0",
10
10
  "argly": "^1.2.0",
11
11
  "browser-refresh-client": "1.1.4",
@@ -1,4 +1,5 @@
1
- var nextComponentIdProvider = require("@internal/components-util").___nextComponentIdProvider;
1
+ var nextComponentIdProvider =
2
+ require("@internal/components-util").___nextComponentIdProvider;
2
3
 
3
4
  function GlobalComponentsContext(out) {
4
5
  this.___renderedComponentsById = {};