@synstack/text 1.2.0 → 1.2.2

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/README.md CHANGED
@@ -4,9 +4,6 @@
4
4
 
5
5
  This is a strongly opinionated implementation of string templating. It's basically JSX for text and solves many quirks of string interpolation and formatting.
6
6
 
7
- > [!WARNING]
8
- > This package is included in the [@synstack/synscript](https://github.com/pAIrprogioio/synscript) package. It is not recommended to install both packages at the same time.
9
-
10
7
  ## What is it for ?
11
8
 
12
9
  Turns this:
@@ -1,3 +1,4 @@
1
+ import { Resolvable } from '@synstack/resolved';
1
2
  import { CallableResolvable } from '@synstack/resolved/callable';
2
3
 
3
4
  /**
@@ -80,7 +81,7 @@ declare class TextParseExtraItemException extends Error {
80
81
  * assert.equal(text, "Hello World");
81
82
  * ```
82
83
  */
83
- declare const tIf: <CHECK extends unknown>(condition: CHECK) => <TValues extends Array<Text.TemplateValue.Base>>(template: TemplateStringsArray, ...args: TValues) => CHECK extends Promise<any> ? Text.Return<TValues> extends Promise<any> ? Text.Return<TValues> : Promise<Text.Return<TValues>> : Text.Return<TValues>;
84
+ declare const tIf: <CHECK extends Resolvable<any>>(condition: CHECK) => <TValues extends Array<Text.TemplateValue.Base>>(template: TemplateStringsArray, ...args: TValues) => CHECK extends Promise<any> ? Text.Return<TValues> extends Promise<any> ? Text.Return<TValues> : Promise<Text.Return<TValues>> : Text.Return<TValues>;
84
85
  /**
85
86
  * Serializes and formats a template string with values into a single string while preserving extra values typings
86
87
  * @returns The serialized and formatted string
@@ -1,3 +1,4 @@
1
+ import { Resolvable } from '@synstack/resolved';
1
2
  import { CallableResolvable } from '@synstack/resolved/callable';
2
3
 
3
4
  /**
@@ -80,7 +81,7 @@ declare class TextParseExtraItemException extends Error {
80
81
  * assert.equal(text, "Hello World");
81
82
  * ```
82
83
  */
83
- declare const tIf: <CHECK extends unknown>(condition: CHECK) => <TValues extends Array<Text.TemplateValue.Base>>(template: TemplateStringsArray, ...args: TValues) => CHECK extends Promise<any> ? Text.Return<TValues> extends Promise<any> ? Text.Return<TValues> : Promise<Text.Return<TValues>> : Text.Return<TValues>;
84
+ declare const tIf: <CHECK extends Resolvable<any>>(condition: CHECK) => <TValues extends Array<Text.TemplateValue.Base>>(template: TemplateStringsArray, ...args: TValues) => CHECK extends Promise<any> ? Text.Return<TValues> extends Promise<any> ? Text.Return<TValues> : Promise<Text.Return<TValues>> : Text.Return<TValues>;
84
85
  /**
85
86
  * Serializes and formats a template string with values into a single string while preserving extra values typings
86
87
  * @returns The serialized and formatted string
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "1.2.0",
7
+ "version": "1.2.2",
8
8
  "description": "String templating as it was meant to be",
9
9
  "keywords": [
10
10
  "string",
@@ -50,19 +50,19 @@
50
50
  }
51
51
  },
52
52
  "dependencies": {
53
- "@synstack/json": "1.1.6",
54
- "@synstack/resolved": "1.2.3",
55
- "@synstack/str": "1.2.5"
53
+ "@synstack/json": "1.1.8",
54
+ "@synstack/resolved": "1.2.5",
55
+ "@synstack/str": "1.2.7"
56
56
  },
57
57
  "devDependencies": {
58
- "@types/node": "^22.10.1",
58
+ "@types/node": "^22.15.17",
59
59
  "tsup": "^8.4.0",
60
- "typescript": "^5.7.3"
60
+ "typescript": "^5.8.3"
61
61
  },
62
62
  "files": [
63
63
  "src/**/*.ts",
64
64
  "!src/**/*.test.ts",
65
65
  "dist/**/*"
66
66
  ],
67
- "gitHead": "7f6de98438522e2b7884c909b22b4b446c725dfc"
67
+ "gitHead": "4bf0bcaecdadd27ce3fe78ae0ce32ae1d09f0a24"
68
68
  }