import { SerializedTemplateInfo , TemplateInfo , TemplateInfoFactory , } from "@opticss/template-api" ; declare module "@opticss/template-api" { export interface TemplateTypes { "TestTemplate" : TestTemplate ; } } /**
 * Represents a single TestTemplate and its associated content and meta data.
 */ export class TestTemplate implements TemplateInfo < "TestTemplate" > { type : "TestTemplate" ; identifier : string ; contents : string ; plainHtml : boolean ; param identifier param contents param plainHtml constructor ( identifier , contents , plainHtml ? ) { this . type = "TestTemplate" ; this . identifier = identifier ; this . contents = contents ; this . plainHtml = ! ! plainHtml ; } static deserialize ( identifier , ... data ) { return new TestTemplate ( identifier , data [ 0 ] , data [ 1 ] === "true" ) ; } serialize ( ) { return { type : "TestTemplate" , identifier : this . identifier , data : [ this . contents , this . plainHtml ? "true" : "false" , ] , } ; } } TemplateInfoFactory . constructors [ "TestTemplate" ] = TestTemplate . deserialize ;