Template API V2: `findLayers` doesn't work with `path`

Offen
#325 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
typescript

Rechercherichtung

Start by locating the Template API V2 implementation of findLayers and compare its handling of the path option with findConnectedInstances, which the report says works. Reproduce the error with path: ['parentLayerName'] and path: []; done means findLayers accepts the documented option or the documentation is corrected to match its supported behavior.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

API question

Hi everyone,

I can't get findLayers() to work with the path prop, even though the docs say that it should work.

Image Image

I'm using Template API V2.

instance.findLayers((child) => true) works fine

instance.findConnectedInstances((child) => true, { path: ['parentLayerName'], }) also works fine

but just calling instance.findLayers((child) => true, { path: ['parentLayerName'] })
or even instance.findLayers((child) => true, { path: [] })
immediately gets me an error, even before using the result in any way:
Image

Am I doing something wrong, or is there a bug in findLayers, or maybe it's described incorrectly in the docs and doesn't actually accept path?

Vorherrschende Sprache
TypeScript
Sterne
1.6k
Forks
126
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus figma/code-connect

Alle Issues in figma/code-connect

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.