Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion skipruntime-ts/api/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ export interface SkipService<
/** The external service dependencies of the service */
externalServices?: { [name: string]: ExternalService };
/** The reactive resources which compose the public interface of this reactive service */
resources?: {
resources: {
[name: string]: new (params: {
[param: string]: string;
}) => Resource<ResourceInputs>;
Expand Down
20 changes: 9 additions & 11 deletions skipruntime-ts/wasm/src/internals/skipruntime_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -891,17 +891,15 @@ class LinksImpl implements Links {
}
const skresources =
this.fromWasm.SkipRuntime_ResourceBuilderMap__create();
if (service.resources) {
for (const [name, builder] of Object.entries(service.resources)) {
const skbuilder = this.fromWasm.SkipRuntime_createResourceBuilder(
this.handles.register(new ResourceBuilder(builder)),
);
this.fromWasm.SkipRuntime_ResourceBuilderMap__add(
skresources,
skjson.exportString(name),
skbuilder,
);
}
for (const [name, builder] of Object.entries(service.resources)) {
const skbuilder = this.fromWasm.SkipRuntime_createResourceBuilder(
this.handles.register(new ResourceBuilder(builder)),
);
this.fromWasm.SkipRuntime_ResourceBuilderMap__add(
skresources,
skjson.exportString(name),
skbuilder,
);
}
const skservice = this.fromWasm.SkipRuntime_createService(
this.handles.register(service),
Expand Down