Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Typescript warnings with dayjs relative time

$
0
0

i'm using dayjs relative time and it is working as expected but i can't fix typescript warnings

function MyComponent() {  var relativeTime = require('dayjs/plugin/relativeTime');  dayjs.extend(relativeTime);return(...<Text>{dayjs('2020-06-04T11:08:31.000000Z').fromNow()}</Text>...)

I'm getting 2 warnings :

  1. Property 'extend' does not exist on type 'typeof import("dayjs")'.
  2. This expression is not callable.Type 'typeof import("dayjs")' has no call signatures.

Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>