As a beginner in TypeScript, I'm currently exploring the appropriate type for JavaScript's new Set([1, 2, 3])
, but my search has been unsuccessful so far.
For instance:
const objNums: {[key: string]: number} = {one: 1, two: 2, three: 3};
const arrNums: Array<number> = [1, 2, 3];
const setNums /* : type??? */ = new Set([1, 2, 3]); // ????
// Here is an example scenario illustrating why defining a variable type is important and my query about identifying that type:
function someFn(arg) {
console.log(arg);
}
someFn(setNums);