Support checked closed generic portable bindings
This commit is contained in:
@@ -210,11 +210,10 @@ export function generatePortableTypeScriptBindings(
|
||||
adapters: string[] = [],
|
||||
descriptors: unknown[] = [];
|
||||
for (const entry of entries) {
|
||||
if (entry.application || entry.kind === "constructor")
|
||||
throw new PortableBindingError(
|
||||
entry.id,
|
||||
"Portable generic adapters/legacy constructors are not implemented; declare an ordinary factory",
|
||||
);
|
||||
// The checked binding schema already contains concrete generic applications.
|
||||
// Each has its own identity, value codecs and specialized dependency ports.
|
||||
if (entry.kind === "constructor")
|
||||
throw new PortableBindingError(entry.id, "Legacy constructors are not supported; declare an ordinary factory");
|
||||
if (names.has(entry.displayName)) throw new PortableBindingError(entry.id, "Duplicate handler name");
|
||||
names.add(entry.displayName);
|
||||
const portNames = new Set<string>();
|
||||
|
||||
Reference in New Issue
Block a user