loopbackio / loopbackio/loopback-next
loopback-datasource-juggler datasource definition for setup method is missing
Đang mở
@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
- I create custom datasource
class MyDataSource which extends juggler.Datasource. - I create method setup inside class MyDataSource .
- 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'.

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
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.