Comparing version 0.3.0 to 0.3.1
export type Args = Record<string, any>; | ||
export type Blocks = Record<string, Compiler>; | ||
export type Compiler = <T extends Args> (data?: T, blocks?: Blocks) => Promise<string>|string; | ||
export type Compiler<T extends Args = Args> = | ||
| ((data: T, blocks?: Blocks) => Promise<string>|string) | ||
| ((data?: T) => Promise<string>|string) | ||
export interface Options { | ||
@@ -15,4 +18,5 @@ loose?: boolean; | ||
export function compile(input: string, options?: Options & { async: true }): <T extends Args> (data: T) => Promise<string>; | ||
export function compile(input: string, options?: Options & { async: false }): <T extends Args> (data: T) => string; | ||
export function compile(input: string, options?: Options & { escape?: typeof esc; }): Compiler; | ||
type CompileOptions = Options & { escape?: typeof esc }; | ||
export function compile(input: string, options?: CompileOptions & { async: true }): <T extends Args> (data?: T, blocks?: Blocks) => Promise<string>; | ||
export function compile(input: string, options?: CompileOptions & { async?: false }): <T extends Args> (data?: T, blocks?: Blocks) => string; | ||
export function compile(input: string, options?: CompileOptions): Compiler; |
{ | ||
"name": "tempura", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"repository": "lukeed/tempura", | ||
@@ -5,0 +5,0 @@ "description": "A light, crispy, and delicious template engine", |
@@ -25,3 +25,3 @@ <div align="center"> | ||
* **Extremely lightweight**<br> | ||
_Everything is `1.23 kB` (gzip) – even less with tree-shaking!_ | ||
_Everything is `1.26 kB` (gzip) – even less with tree-shaking!_ | ||
@@ -28,0 +28,0 @@ * **Super Performant**<br> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23014
523