I came across some code that looks like this:

export function foo(arg: string): arg is MyType {
    return ...
}

I haven’t been able to search for is in either the docs or google, it’s a pretty common word and shows up on basically every page.

What does the keyword do in that context?

2 Answers
2

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *