Closed Nickm615 closed 1 year ago
When using the range filter in a typescript project, providing date/time strings as arguments causes a type error 'argument of type 'string' is not assignable to parameter of type 'number.' Based on our documentation this should be supported https://kontent.ai/learn/tutorials/develop-apps/get-content/filter-content-items-examples/?tech=typescript#a-range-of-dates-and-numbers
Create delivery client in typescript file Apply range filter with date/time strings as arguments
TS does not flag this with error
Node 18.16.0
Add any other context about the problem here.
Add links to screenshots, if possible.
Fixed by https://github.com/kontent-ai/delivery-sdk-js/pull/368
Brief bug description
When using the range filter in a typescript project, providing date/time strings as arguments causes a type error 'argument of type 'string' is not assignable to parameter of type 'number.' Based on our documentation this should be supported https://kontent.ai/learn/tutorials/develop-apps/get-content/filter-content-items-examples/?tech=typescript#a-range-of-dates-and-numbers
Repro steps
Create delivery client in typescript file Apply range filter with date/time strings as arguments
Expected behavior
TS does not flag this with error
Test environment
Node 18.16.0
Additional context
Add any other context about the problem here.
Screenshots
Add links to screenshots, if possible.