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

Đang mở
#325 1 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
typescript
Lĩnh vực
developer-experience

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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?

Ngôn ngữ chính
TypeScript
Star
1.6k
Fork
126
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của figma/code-connect

Tất cả issue của figma/code-connect

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.