midway icon indicating copy to clipboard operation
midway copied to clipboard

fix(core): DataSourceManagerConfigOption generic OPTIONS now no changes by PowerPartial

Open waitingsong opened this issue 1 year ago • 2 comments
trafficstars

数据源配置参数类型不应该作转换,否则在使用类似

  protected getDbConfigByDbId(dbId: string): DbConfig | undefined {
    const dbConfig = this.sourceConfig.dataSource?.[dbId]
    return dbConfig
  }

取值获得的类型是可能无法赋值给 DbConfig 类型

waitingsong avatar Aug 14 '24 06:08 waitingsong

DataSourceManagerConfigOption<ConnectionOpts>DataSourceManager 自己不关心泛型参数 ConnectionOpts 类型是什么, ConnectionOpts 透传给数据源初始化方法,所以我认为不需要对它作转换。

waitingsong avatar Aug 14 '24 06:08 waitingsong

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 84.73%. Comparing base (a3ca53b) to head (9fa6450). Report is 333 commits behind head on main.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4013      +/-   ##
==========================================
+ Coverage   84.55%   84.73%   +0.18%     
==========================================
  Files         491      501      +10     
  Lines       46778    47589     +811     
  Branches     5601     5357     -244     
==========================================
+ Hits        39551    40324     +773     
- Misses       7191     7243      +52     
+ Partials       36       22      -14     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Aug 26 '24 15:08 codecov-commenter