add transformer pattern & rest transformer for API (#58388)
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
This commit is contained in:
@@ -10,6 +10,7 @@ import { Tool, tags as toolTags } from './tool'
|
||||
import { Spotlight, tags as spotlightTags } from './spotlight'
|
||||
import { Prompt } from './prompt'
|
||||
import IndentedDataReference from './indented-data-reference'
|
||||
import { apiTransformerTags } from '@/article-api/liquid-renderers'
|
||||
|
||||
// Type assertions for .js files without type definitions
|
||||
// Copilot: Remove these assertions when the corresponding .js files are converted to TypeScript
|
||||
@@ -40,6 +41,11 @@ for (const tag in spotlightTags) {
|
||||
|
||||
engine.registerTag('prompt', anyPrompt)
|
||||
|
||||
// Register API transformer tags
|
||||
for (const [tagName, tagClass] of Object.entries(apiTransformerTags)) {
|
||||
engine.registerTag(tagName, tagClass as any)
|
||||
}
|
||||
|
||||
/**
|
||||
* Like the `size` filter, but specifically for
|
||||
* getting the number of keys in an object
|
||||
|
||||
Reference in New Issue
Block a user