@audiotool/nexus - v0.0.12
    Preparing search index...

    Interface FieldQuery<T>

    interface FieldQuery<T extends NexusField | PrimitiveField<PrimitiveType>> {
        get(): T[];
        getByEntity(): Map<string, T[]>;
        getOne(): undefined | T;
        notPointedTo(): FieldQuery<T>;
        ofTargetTypes(
            ...targetTypes: (
                | "Groove"
                | "Sample"
                | "MicroTuning"
                | "Listenable"
                | "AutomatableParameter"
                | "AudioInput"
                | "AudioOutput"
                | "NotesInput"
                | "NotesOutput"
                | "AutomationCollection"
                | "AudioTrack"
                | "AudioTrackPlayer"
                | "PatternTrack"
                | "PatternTrackPlayer"
                | "NoteCollection"
                | "NoteTrack"
                | "NoteTrackPlayer"
                | "AutomationTrack"
                | "Waveshaper"
                | "Centroid"
                | "RasselbockPatternSlot"
                | "TonematrixPatternSlot"
                | "Beatbox8PatternSlot"
                | "Beatbox9PatternSlot"
                | "BasslinePatternSlot"
                | "MachinistePatternSlot"
                | "MatrixArpeggiatorPatternSlot"
                | "MixerStripGroup"
                | "MixerStripGroupChild"
                | "MixerSideChainInput"
                | "MixerSideChainOutput"
                | "MixerAuxSend"
                | "MixerAuxReceive"
            )[],
        ): FieldQuery<T>;
        pointedToBy(location: NexusLocation): FieldQuery<T>;
        primitiveFields(): FieldQuery<
            PrimitiveField<PrimitiveType, "mut" | "immut">,
        >;
    }

    Type Parameters

    Index

    Methods

    • Returns all primitive fields selected using this query, as part of a ComparableMap that maps entity ids to fields for that entity.

      Returns Map<string, T[]>

    • Returns the first primitive field of the result, or undefined if the query is empty.

      Returns undefined | T

    • Only keep fields that are marked with target type appearing in targetTypes.

      Parameters

      • ...targetTypes: (
            | "Groove"
            | "Sample"
            | "MicroTuning"
            | "Listenable"
            | "AutomatableParameter"
            | "AudioInput"
            | "AudioOutput"
            | "NotesInput"
            | "NotesOutput"
            | "AutomationCollection"
            | "AudioTrack"
            | "AudioTrackPlayer"
            | "PatternTrack"
            | "PatternTrackPlayer"
            | "NoteCollection"
            | "NoteTrack"
            | "NoteTrackPlayer"
            | "AutomationTrack"
            | "Waveshaper"
            | "Centroid"
            | "RasselbockPatternSlot"
            | "TonematrixPatternSlot"
            | "Beatbox8PatternSlot"
            | "Beatbox9PatternSlot"
            | "BasslinePatternSlot"
            | "MachinistePatternSlot"
            | "MatrixArpeggiatorPatternSlot"
            | "MixerStripGroup"
            | "MixerStripGroupChild"
            | "MixerSideChainInput"
            | "MixerSideChainOutput"
            | "MixerAuxSend"
            | "MixerAuxReceive"
        )[]

      Returns FieldQuery<T>