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),
1250
Content
= $"export declare {item.Declaration};",
1363
Content
= body.ToString(),
1446
Content
= body.ToString(),
1490
Content
= body.ToString(),
Aspire.Hosting.CodeGeneration.TypeScript.Tests (1)
AtsTypeScriptCodeGeneratorTests.cs (1)
2360
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)
2481
declaration => declaration.
Content
.StartsWith(
2491
Assert.Equal(expectedDeclaration, declaration.
Content
);
2604
declaration.
Content
);
2637
declaration => declaration.
Content
.StartsWith("export interface RunAsEmulatorOptions ", StringComparison.Ordinal));
2640
declaration => declaration.
Content
.StartsWith("export interface RunAsEmulatorOptions ", StringComparison.Ordinal));
2654
eventHubsOptions.
Content
);
2661
serviceBusOptions.
Content
);
2662
Assert.NotEqual(eventHubsOptions.
Content
, serviceBusOptions.
Content
);
2778
declaration => Assert.DoesNotContain('\r', declaration.
Content
));
2789
var completeSource = string.Join("\n", model.Declarations.Select(declaration => declaration.
Content
));
2800
.Select(declaration => declaration.
Content
));