Assert that a value is of a specific OCF type, throwing if not.
Optional
const issuer = assertOcfIssuer(data); // Throws if not an OcfIssuer console.log(issuer.legal_name); // TypeScript knows this is valid Copy
const issuer = assertOcfIssuer(data); // Throws if not an OcfIssuer console.log(issuer.legal_name); // TypeScript knows this is valid
Assert that a value is of a specific OCF type, throwing if not.