lang.typedesc
Module lang.typedesc
API
Definitions
The lang.typedesc module corresponds to the typedesc basic type.
typedesc
function typeIds(typedesc t, boolean primaryOnly) returns readonly & TypeId[]?
Returns the type-ids induced by a typedesc value.
Copytype Error distinct error; type SampleError distinct (Error & error<record {string msg;}>); Error.typeIds() ⇒ [{"moduleId":{"organization":"$anon","name":".","platformParts":["0"]},"localId":"Error"}] SampleError.typeIds() ⇒ [{"moduleId":{"organization":"$anon","name":".","platformParts":["0"]},"localId":"SampleError"},{"moduleId":{"organization":"$anon","name":".","platformParts":["0"]},"localId":"Error"}] SampleError.typeIds(true) ⇒ [{"moduleId":{"organization":"$anon","name":".","platformParts":["0"]},"localId":"SampleError"}]
type Error distinct error; type SampleError distinct (Error & error<record {string msg;}>); Error.typeIds() ⇒ [{"moduleId":{"organization":"$anon","name":".","platformParts":["0"]},"localId":"Error"}] SampleError.typeIds() ⇒ [{"moduleId":{"organization":"$anon","name":".","platformParts":["0"]},"localId":"SampleError"},{"moduleId":{"organization":"$anon","name":".","platformParts":["0"]},"localId":"Error"}] SampleError.typeIds(true) ⇒ [{"moduleId":{"organization":"$anon","name":".","platformParts":["0"]},"localId":"SampleError"}]
t
A record representing an identifier for a module. This uniquely identifies a module within a program.
A record representing a type-id. A type-id uniquely identifies an occurrence of a distinct type descriptor within a program.
moduleId
Import
import ballerina/lang.typedesc;
Metadata
Released date: 3 days ago
Version: 2201.12.5
Compatibility
Platform: java21
Ballerina version: 2201.12.5
GraalVM compatible: Yes
Other versions
2201.12.5