docsforadobe / Types-for-Adobe

TypeScript types for Adobe: AfterEffects, Animate, Audition, Illustrator, InDesign, Photoshop, Premiere, ScriptUI.
517 stars 124 forks source link

Linting error due to missing numItems and length in ComponentPropertiesCollection for Premiere/15.0 #112

Closed galaddirie closed 9 months ago

galaddirie commented 11 months ago

I noticed a error where the numItems and length properties are undefined in ComponentPropertiesCollection. For example the followng code functions as expected during runtime, but the lack of type definitions for these properties causes linting warnings. Property 'numItems' does not exist on type 'ComponentParamCollection'.ts(2339)

const seq = app.project.activeSequence;
  const tracks = seq.getSelection();
  for (let track of tracks) {
      let components: ComponentCollection = track.components;
      for (let i = 0; i < components.numItems; i++) {
          const comp = components[i];
          comp.properties[0]
          for (let j = 0; j < comp.properties.numItems; j++) { // !THE ISSUE
              // numItems and length is not defined in ComponentPropertiesCollection, but this exists