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

Converting fingerprint.react-native from cuid to Typescript

$
0
0

The implementation in the cuid NPM library is:

import { pad } from './pad'

var globalCount = Object.keys(global);
var clientId = pad(globalCount.toString(36), 4);

module.exports = function fingerprint () {
  return clientId;
};


When converted to typescript the globalCount.toString(36) method gets the error:

Expected 0 arguments, but got 1.ts(2554)

So I assume the correct thing to do is just remove 36?

Anyone know why the 36 is there? Perhaps this is something that works in react native and I should type around it somehow?


Viewing all articles
Browse latest Browse all 6211

Trending Articles



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