static async fromTypeId()

in src/internal/BinaryType.ts [376:398]


    static async fromTypeId(communicator: BinaryCommunicator, typeId: number, schemaId: number) {
        let result = new BinaryTypeBuilder();
        let type = await communicator.typeStorage.getType(typeId, schemaId);
        if (type) {
            result._type = type;
            if (schemaId !== null) {
                result._schema = type.getSchema(schemaId);
                if (!result._schema) {
                    throw IgniteClientError.serializationError(
                        false, Util.format('schema id "%d" specified for complex object of type "%s" not found',
                            schemaId, type.name));
                }
                result._fromStorage = true;
            }
            else {
                result._schema = new BinarySchema();
            }
            return result;
        }
        result._init(null);
        result._type.id = typeId;
        return result;
    }