Regular Expressions 101

Community Patterns

Typescript Types

0

Regular Expression
ECMAScript (JavaScript)

/
[\t\s\n]*\/{2,3}@?.*|export|enum(\s?\{)(\n|.)*?\}|import\s(type\s)?\{.*}\s.*;|\slang="ts"|(?<=[\w]?)(?:\:\s.[a-zA-Z\[\]\'\s\.<>]*?)(?=\s|\,)|\<.+\>(?=[\w\(\)])
/
gm

Description

get all typescript types, as well as imports and exports

Submitted by snuffyDev - a year ago