AutoMovie API
    Preparing search index...

    Function collectDeclaredIds

    • Collect the ids a list of records declares, reporting each blank or repeated one.

      Each record's id is checked at <path>[<index>].id: a blank id gets a type violation <label> id must be non-empty, and an id already seen earlier in the list gets a type violation <label> id "<id>" must be unique on the later record. Every id, blank or repeated included, is in the returned set, so references to it resolve and the one defect is reported once, on the declaration.

      Type Parameters

      • Declared extends { id: string }

      Parameters

      • records: readonly Declared[]

        Records in declaration order.

      • path: string

        Violation path of the list itself, such as $input.spaces.

      • label: string

        Name of one record in the messages, such as logical space.

      • collector: IAutoMovieViolationCollector

        Sink that receives the violations.

      Returns Set<string>

      The set of declared ids, for resolving references.