@rohal12/twee-ts 1.1.1 → 1.2.0

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/index.d.cts CHANGED
@@ -248,9 +248,10 @@ declare function storyInspect(story: Story): StoryMap;
248
248
 
249
249
  /**
250
250
  * Apply tag aliases: for each passage carrying an alias tag, add the canonical
251
- * tag if not already present. Idempotent — safe to call multiple times.
251
+ * tag if not already present. Returns new passage objects where tags changed;
252
+ * unchanged passages are returned as-is. Idempotent — safe to call multiple times.
252
253
  */
253
- declare function applyTagAliases(passages: Passage[], aliases: Record<string, string>): void;
254
+ declare function applyTagAliases(passages: readonly Passage[], aliases: Record<string, string>): Passage[];
254
255
 
255
256
  /**
256
257
  * Twee 3 state-machine lexer implemented as a synchronous generator.
package/dist/index.d.ts CHANGED
@@ -248,9 +248,10 @@ declare function storyInspect(story: Story): StoryMap;
248
248
 
249
249
  /**
250
250
  * Apply tag aliases: for each passage carrying an alias tag, add the canonical
251
- * tag if not already present. Idempotent — safe to call multiple times.
251
+ * tag if not already present. Returns new passage objects where tags changed;
252
+ * unchanged passages are returned as-is. Idempotent — safe to call multiple times.
252
253
  */
253
- declare function applyTagAliases(passages: Passage[], aliases: Record<string, string>): void;
254
+ declare function applyTagAliases(passages: readonly Passage[], aliases: Record<string, string>): Passage[];
254
255
 
255
256
  /**
256
257
  * Twee 3 state-machine lexer implemented as a synchronous generator.