loopbackio / loopbackio/loopback-next

loopback-datasource-juggler datasource definition for setup method is missing

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

@achrinza đang làm issue này rồi.

Từ ngày 5/10/2021.

bug
Ngôn ngữ chính
TypeScript
Star
5.1k
Fork
1.1k
Merge trung bình
2 ngày 21 giờ
Pull request đã merge (30 ngày)
27

Mô tả

Steps to reproduce

At https://github.com/strongloop/loopback-datasource-juggler/blob/master/types/datasource.d.ts,
there is no definition for method setup, which is defined at:
https://github.com/strongloop/loopback-datasource-juggler/blob/06428247ad1cc48bce82d135f795fb3eaae28b33/lib/datasource.js#L382

  1. I create custom datasource class MyDataSource which extends juggler.Datasource.
  2. I create method setup inside class MyDataSource .
  3. I can not use: super.setup() inside method setup.

Current Behavior

When I want to use super.setup(), there will be ts error: Property 'setup' does not exists on type 'Datasource'.
Selection_161

Expected Behavior

No ts error when I want to use super.setup() inside setup method on my custom datasource class.

Additional information

Setup method definition:

  /**
   * Setup datasource
   * @param dsName The name of the datasource.
   * @param settings The datasource settings
   */
  setup(dsName: string, settings: Options): void;
  setup(settings: Options): void;

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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.

Đánh giá

Issue này chưa được đánh giá.

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.