@rbxts-js/jest-get-type
v3.13.3-ts.3
Published
Upstream: https://github.com/facebook/jest/tree/v27.4.7/packages/jest-get-type
Readme
jest-get-type
Upstream: https://github.com/facebook/jest/tree/v27.4.7/packages/jest-get-type
A utility function to get the type of a value, including Luau and Roblox types.
Types supported:
- Lua Primitives -
nil,table,number,string,function,boolean,userdata,thread - Luau Polyfill types -
symbol,regexp,error,set - Roblox datatypes -
DateTime, and otherbuiltintypes
:pencil2: Notes
- Lua makes no distinction between tables, objects, and arrays. We always return
tableat this level and consumers are expected to check at a higher level. - Lua makes no distinction between
nullandundefinedso we only returnnil. - Lua lacks the following primitives:
bigint,symbol. - Lua lacks the following built-in types:
RegExp,Map,Set,Date. JestGetTypedeviates and exposes anisRobloxBuiltinmethod to check whether a value is a Roblox builtin type
