Skip to content

Commit

Permalink
update code-gen files
Browse files Browse the repository at this point in the history
  • Loading branch information
hellovai committed Jul 22, 2024
1 parent 75b2be0 commit 0002a70
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion integ-tests/typescript/baml_client/tracing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ DO_NOT_USE_DIRECTLY_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_CTX.upsertTags.bind(DO_NOT_
const flush = () => {
DO_NOT_USE_DIRECTLY_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_CTX.flush.bind(DO_NOT_USE_DIRECTLY_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_CTX)()
}
const onLogEvent = (callback: (event: BamlLogEvent) => void) =>
const onLogEvent = (callback: undefined | (event: BamlLogEvent) => void) =>
DO_NOT_USE_DIRECTLY_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_CTX.onLogEvent(callback)

export { traceAsync, traceSync, setTags, flush, onLogEvent }
12 changes: 12 additions & 0 deletions integ-tests/typescript/baml_client/type_builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,18 @@ export default class TypeBuilder {
return this.tb.list(type)
}

null(): FieldType {
return this.tb.null()
}

map(key: FieldType, value: FieldType): FieldType {
return this.tb.map(key, value)
}

union(types: FieldType[]): FieldType {
return this.tb.union(types)
}

addClass<Name extends string>(name: Name): ClassBuilder<Name> {
return this.tb.addClass(name);
}
Expand Down

0 comments on commit 0002a70

Please sign in to comment.