@jakubmazanec/template 2.0.4 → 2.0.5-unstable.91147a2

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.
@@ -6,7 +6,7 @@ import { type TemplateAttributes } from './TemplateAttributes.js';
6
6
  * @typeParam A Type of Zod schema used to validate the custom template attributes.
7
7
  * @typeParam D Type of Zod schema used to define the type of template data.
8
8
  */
9
- export type TemplateRender<A extends z.AnyZodObject | undefined = undefined, D extends z.AnyZodObject | undefined = undefined> = {
9
+ export type TemplateRender<A extends undefined | z.AnyZodObject = undefined, D extends undefined | z.AnyZodObject = undefined> = {
10
10
  /** Rendered template attributes. They created from the `to` and `variables` attributes, and from all of the custom template attributes.
11
11
  */
12
12
  attributes: A extends undefined ? Omit<TemplateAttributes, 'if'> : Omit<TemplateAttributes, 'if'> & z.infer<NonNullable<A>>;
@@ -1,3 +1,3 @@
1
1
  import { type z } from 'zod';
2
2
  import { type TemplateRender } from './TemplateRender.js';
3
- export type TemplateRenders<A extends z.AnyZodObject | undefined = undefined, D extends z.AnyZodObject | undefined = undefined> = Array<TemplateRender<A, D>>;
3
+ export type TemplateRenders<A extends undefined | z.AnyZodObject = undefined, D extends undefined | z.AnyZodObject = undefined> = Array<TemplateRender<A, D>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jakubmazanec/template",
3
- "version": "2.0.4",
3
+ "version": "2.0.5-unstable.91147a2",
4
4
  "description": "TypeScript-first library for working with templates using EJS and Zod.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,7 +27,7 @@
27
27
  "typecheck": "tsc --project tsconfig.typecheck.json"
28
28
  },
29
29
  "dependencies": {
30
- "@jakubmazanec/error": "^3.0.0",
30
+ "@jakubmazanec/error": "3.0.5-unstable.91147a2",
31
31
  "ejs": "^3.1.10",
32
32
  "fs-extra": "^11.2.0",
33
33
  "gray-matter": "^4.0.3",
@@ -38,7 +38,7 @@
38
38
  "zod": "^3.23.8"
39
39
  },
40
40
  "devDependencies": {
41
- "@jakubmazanec/eslint-config": "^3.2.0",
41
+ "@jakubmazanec/eslint-config": "4.0.0-unstable.91147a2",
42
42
  "@types/ejs": "^3.1.5",
43
43
  "@types/fs-extra": "^11.0.4",
44
44
  "@types/lodash": "^4.17.13",
@@ -49,7 +49,7 @@
49
49
  "concurrently": "^9.1.0",
50
50
  "del-cli": "^6.0.0",
51
51
  "esbuild": "^0.24.0",
52
- "eslint": "^8.56.0",
52
+ "eslint": "^9.14.0",
53
53
  "lodash": "^4.17.21",
54
54
  "prettier": "^3.3.3",
55
55
  "prettier-plugin-packagejson": "^2.5.3",
@@ -9,8 +9,8 @@ import {type TemplateAttributes} from './TemplateAttributes.js';
9
9
  * @typeParam D Type of Zod schema used to define the type of template data.
10
10
  */
11
11
  export type TemplateRender<
12
- A extends z.AnyZodObject | undefined = undefined,
13
- D extends z.AnyZodObject | undefined = undefined,
12
+ A extends undefined | z.AnyZodObject = undefined,
13
+ D extends undefined | z.AnyZodObject = undefined,
14
14
  > = {
15
15
  /** Rendered template attributes. They created from the `to` and `variables` attributes, and from all of the custom template attributes.
16
16
  */
@@ -3,6 +3,6 @@ import {type z} from 'zod';
3
3
  import {type TemplateRender} from './TemplateRender.js';
4
4
 
5
5
  export type TemplateRenders<
6
- A extends z.AnyZodObject | undefined = undefined,
7
- D extends z.AnyZodObject | undefined = undefined,
6
+ A extends undefined | z.AnyZodObject = undefined,
7
+ D extends undefined | z.AnyZodObject = undefined,
8
8
  > = Array<TemplateRender<A, D>>;