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:
parent
c7fe09196f
commit
8f9b505345
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user