Top "Typechecking" questions

A typechecker enforces that expressions in a given programming language are well typed -- i.e. conform to the rules of a particular type system.

Class type check in TypeScript

In ActionScript, it is possible to check the type at run-time using the is operator: var mySprite:Sprite = new Sprite(); …

typescript typechecking
What is the best (idiomatic) way to check the type of a Python variable?

I need to know if a variable in Python is a string or a dict. Is there anything wrong with …

python types typechecking
How do you find out the type of an object (in Swift)?

When trying to understand a program, or in some corner-cases, it's useful to be able to actually find out what …

swift typechecking
Checking if an object is a given type in Swift

I have an array that is made up of AnyObject. I want to iterate over it, and find all elements …

swift type-inference typechecking
Java: Instanceof and Generics

Before I look through my generic data structure for a value's index, I'd like to see if it is even …

java generics instanceof typechecking
Check whether a variable is a string in Ruby

Is there anything more idiomatic than the following? foo.class == String

ruby idioms typechecking
How to check if a Ruby object is a Boolean

I can't seem to check if an object is a boolean easily. Is there something like this in Ruby? true.…

ruby typechecking
Type checking of arguments Python

Sometimes checking of arguments in Python is necessary. e.g. I have a function which accepts either the address of …

python typechecking
Type annotations for *args and **kwargs

I'm trying out Python's type annotations with abstract base classes to write some interfaces. Is there a way to annotate …

python type-hinting typechecking typing
Is there a way to check if a variable is a Date in JavaScript?

I was wondering if there is any way to check if an object is specifically a Date in JavaScript. isType …

javascript date typechecking