EvenAR / node-simconnect

A cross platform SimConnect client library for Node.JS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Better type safety for `DataRequestId`, `DataDefinitionId`, `ClientDataDefinitionId`, etc

EvenAR opened this issue · comments

Today these are just aliases for number and provide no type safety at all. For instance, it should not be possible to pass a DataRequestId to the DataDefinitionId parameter of a function.

One way to improve the type safety is to make the types "opaque". A singleton class could be provided for generating new id's with the correct type.