Skip to content

Typescript codegen issue with csharp module. #1977

@bfops

Description

@bfops

Generating TypeScript bindings for a module which uses a timer table fails with error: not yet implemented, apparently here, apparently while generating the bindings for the ScheduleAt enum. Fix this so that it's possible to generate TypeScript bindings for a module which defines at least one timer table.

Update:
Csharp module with timer fails to generate bindings for ScheduleAt enum.
Binding generated for timer struct looks like -

#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
pub struct SendMessageTimer {
	pub text: String,
	pub scheduled_id: u64,
	pub scheduled_at: enum { Time: u64, Interval: u64 },
}

May be related to Typespace not using AlgebraicTypeRef for ScheduledAt enum

Typespace { types: [Product(ProductType { elements: [ProductTypeElement { name: Some("Text"), algebraic_type: Builtin(String) }, ProductTypeElement { name: Some("ScheduledId"), algebraic_type: Builtin(U64) }, ProductTypeElement { name: Some("ScheduledAt"), algebraic_type: Sum(SumType { variants: [SumTypeVariant { name: Some("Time"), algebraic_type: Builtin(U64) }, SumTypeVariant { name: Some("Interval"), algebraic_type: Builtin(U64) }}] },

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions