1
1
mirror of https://github.com/github/semantic.git synced 2024-12-21 13:51:44 +03:00

Add TypeAssertion and Cast

This commit is contained in:
joshvera 2017-08-16 20:48:11 -04:00
parent c7fe09196f
commit 8f9b505345

View File

@ -110,6 +110,8 @@ type Syntax = '[
, Language.TypeScript.Syntax.Function
, Language.TypeScript.Syntax.Tuple
, Language.TypeScript.Syntax.Constructor
, Language.TypeScript.Syntax.TypeAssertion
, Language.TypeScript.Syntax.Cast
, Type.Visibility
, []
]
@ -160,6 +162,18 @@ data TypeParameter a = TypeParameter { typeParameter :: !a, typeParameterConstra
instance Eq1 TypeParameter where liftEq = genericLiftEq
instance Show1 TypeParameter where liftShowsPrec = genericLiftShowsPrec
data TypeAssertion a = TypeAssertion { typeAssertionParameters :: !a, typeAssertionExpression :: !a }
deriving (Diffable, Eq, Foldable, Functor, GAlign, Generic1, Show, Traversable)
instance Eq1 TypeAssertion where liftEq = genericLiftEq
instance Show1 TypeAssertion where liftShowsPrec = genericLiftShowsPrec
data Cast a = Cast { castSubject :: !a, castType :: !a }
deriving (Diffable, Eq, Foldable, Functor, GAlign, Generic1, Show, Traversable)
instance Eq1 Cast where liftEq = genericLiftEq
instance Show1 Cast where liftShowsPrec = genericLiftShowsPrec
data Annotation a = Annotation { typeAnnotation :: !a }
deriving (Diffable, Eq, Foldable, Functor, GAlign, Generic1, Show, Traversable)