16 writes to Content
Aspire.Hosting.CodeGeneration.TypeScript (15)
TypeScriptApiProjector.cs (15)
464
Content
= RuntimeDeclarationContent,
547
Content
= exportedNamespace.Content,
608
Content
= $"export type {handleName} = Handle<'{typeId}'>;",
630
Content
= $"export interface {name} extends {baseType} {{}}",
648
Content
= $"export interface {promiseName} extends PromiseLike<{name}> {{}}",
1028
Content
= BuildInterfaceBody(interfaceName, extends, members, includeToJson: true),
1037
Content
= BuildInterfaceBody(promiseInterfaceName, [$"PromiseLike<{interfaceName}>"], promiseMembers, includeToJson: false),
1049
Content
= $"export interface {interfaceName} extends {(isResourceBuilder ? "ResourceBuilderBase" : "HandleReference")} {{}}",
1058
Content
= $"export interface {promiseInterfaceName} extends PromiseLike<{interfaceName}> {{}}",
1071
Content
= BuildInterfaceBody(interfaceName, [], members, includeToJson: false),
1080
Content
= BuildInterfaceBody(promiseInterfaceName, [], promiseMembers, includeToJson: false),
1254
Content
= $"export declare {item.Declaration};",
1367
Content
= body.ToString(),
1450
Content
= body.ToString(),
1494
Content
= body.ToString(),
Aspire.Hosting.CodeGeneration.TypeScript.Tests (1)
AtsTypeScriptCodeGeneratorTests.cs (1)
2717
Content
= "export interface ContosoResource {\r\n configure(enabled?: boolean): Promise<void>;\r\n}",
14 references to Content
Aspire.Hosting.CodeGeneration.TypeScript (2)
TypeScriptApiExportWriter.cs (1)
38
["content"] = declaration.
Content
TypeScriptApiProjector.cs (1)
583
foreach (Match match in DeclaredTypeNameRegex().Matches(declaration.
Content
))
Aspire.Hosting.CodeGeneration.TypeScript.Tests (12)
AtsTypeScriptCodeGeneratorTests.cs (12)
2838
declaration => declaration.
Content
.StartsWith(
2848
Assert.Equal(expectedDeclaration, declaration.
Content
);
2961
declaration.
Content
);
2994
declaration => declaration.
Content
.StartsWith("export interface RunAsEmulatorOptions ", StringComparison.Ordinal));
2997
declaration => declaration.
Content
.StartsWith("export interface RunAsEmulatorOptions ", StringComparison.Ordinal));
3011
eventHubsOptions.
Content
);
3018
serviceBusOptions.
Content
);
3019
Assert.NotEqual(eventHubsOptions.
Content
, serviceBusOptions.
Content
);
3135
declaration => Assert.DoesNotContain('\r', declaration.
Content
));
3146
var completeSource = string.Join("\n", model.Declarations.Select(declaration => declaration.
Content
));
3157
.Select(declaration => declaration.
Content
));