Regular Expressions 101

Community Patterns

Community Library Entry

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 - 2 years ago