-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(feat): setup root and sub client instantiations (#3351)
* fix * (chore): setup root and sub client instantiation * (fix): model snapshots are updated
- Loading branch information
Showing
243 changed files
with
6,023 additions
and
4,598 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { CodeBlock } from "./CodeBlock"; | ||
import { AstNode } from "./core/AstNode"; | ||
import { Writer } from "./core/Writer"; | ||
import { Type } from "./Type"; | ||
|
||
export declare namespace Dictionary { | ||
interface Args { | ||
keyType: Type; | ||
valueType: Type; | ||
entries: MapEntry[]; | ||
} | ||
|
||
interface MapEntry { | ||
key: CodeBlock; | ||
value: CodeBlock; | ||
} | ||
} | ||
|
||
export class Dictionary extends AstNode { | ||
private keyType: Type; | ||
private valueType: Type; | ||
private entries: Dictionary.MapEntry[]; | ||
|
||
constructor({ keyType, valueType, entries }: Dictionary.Args) { | ||
super(); | ||
this.keyType = keyType; | ||
this.valueType = valueType; | ||
this.entries = entries; | ||
} | ||
|
||
public write(writer: Writer): void { | ||
writer.write("new Dictionary<"); | ||
this.keyType.write(writer); | ||
writer.write(", "); | ||
this.valueType.write(writer); | ||
writer.write("> {"); | ||
writer.newLine(); | ||
writer.indent(); | ||
for (const { key, value } of this.entries) { | ||
writer.write("{ "); | ||
key.write(writer); | ||
writer.write(", "); | ||
value.write(writer); | ||
writer.writeLine(" }, "); | ||
} | ||
writer.dedent(); | ||
writer.write("}"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.