Hi. I’ve checked out some threads and I can’t find my specific question anywhere. I have some custom-defined types of tables, and I’m wondering if there’s a way to specifically type check. For example… here are the defined types:
export type Object = {
name: string,
currentLevel: number,
maxLevel: number,
cost: number,
cycleTime: number,
timeRemaining: number,
assetName: string,
model: Model?,
}
export type InteractableObject = Object&{
state: ObjectState,
prompt: ProximityPrompt?
}
I want to be able to do something like:
if x:IsA("InteractableObject")
assuming that x is already known to be an object type. All interactable objects are objects but not all objects are interactable. I could check for a state property for this use case, but I’m just wondering for general purposes as well.