Module

TsBridge.DefaultImpls

Package
purescript-ts-bridge
Repository
thought2/purescript-ts-bridge

#TypeVar Source

data TypeVar :: Symbol -> Typedata TypeVar (s :: Symbol)

Represents a monomorphized type variable. E.g. a Maybe a can become a Maybe (TypeVar "A"). It's useful to create some type aliases for variables that are used often, like: type A = TypeVar "A".

Constructors

#TsBridgeRecord Source

class TsBridgeRecord :: Type -> Row Type -> Constraintclass TsBridgeRecord tok r  where

Members

Instances

#TsBridgeRecordRL Source

class TsBridgeRecordRL :: Type -> RowList Type -> Constraintclass TsBridgeRecordRL tok rl  where

Members

Instances

#TsBridgeVariant Source

class TsBridgeVariant :: Type -> Row Type -> Constraintclass TsBridgeVariant tok r  where

Members

Instances

#TsBridgeVariantRL Source

class TsBridgeVariantRL :: Type -> RowList Type -> Constraintclass TsBridgeVariantRL tok rl  where

Members

Instances

#tsBridgeArray Source

tsBridgeArray :: forall a tok. TsBridgeBy tok a => tok -> Proxy (Array a) -> TsBridgeM TsType

tsBridge type class method implementation for the Array type

See this reference for details.

#tsBridgeBoolean Source

tsBridgeBoolean :: Proxy Boolean -> TsBridgeM TsType

tsBridge type class method implementation for the Boolean type

See this reference for details.

#tsBridgeChar Source

tsBridgeChar :: Proxy Char -> TsBridgeM TsType

tsBridge type class method implementation for the Char type

See this reference for details.

#tsBridgeEffect Source

tsBridgeEffect :: forall tok a. TsBridgeBy tok a => tok -> Proxy (Effect a) -> TsBridgeM TsType

tsBridge type class method implementation for the Effect type

See this reference for details.

#tsBridgeEither Source

tsBridgeEither :: forall tok a b. TsBridgeBy tok a => TsBridgeBy tok b => tok -> Proxy (Either a b) -> TsBridgeM TsType

tsBridge type class method implementation for the Either type

See this reference for details.

#tsBridgeFunction Source

tsBridgeFunction :: forall tok a b. TsBridgeBy tok a => TsBridgeBy tok b => tok -> Proxy (a -> b) -> TsBridgeM TsType

tsBridge type class method implementation for the a -> b (Function) type

See this reference for details.

#tsBridgeInt Source

tsBridgeInt :: Proxy Int -> TsBridgeM TsType

tsBridge type class method implementation for the Int type

See this reference for details.

#tsBridgeMaybe Source

tsBridgeMaybe :: forall tok a. TsBridgeBy tok a => tok -> Proxy (Maybe a) -> TsBridgeM TsType

tsBridge type class method implementation for the Maybe type

See this reference for details.

#tsBridgeNewtype Source

tsBridgeNewtype :: forall tok a t. Newtype a t => TsBridgeBy tok t => tok -> { moduleName :: String, typeArgs :: Array (String /\ (TsBridgeM TsType)), typeName :: String } -> Proxy a -> TsBridgeM TsType

tsBridge type class method implementation for newtypes

#tsBridgeNullable Source

tsBridgeNullable :: forall a tok. TsBridgeBy tok a => tok -> Proxy (Nullable a) -> TsBridgeM TsType

tsBridge type class method implementation for the Nullable type.

See this reference for details.

#tsBridgeNumber Source

tsBridgeNumber :: Proxy Number -> TsBridgeM TsType

tsBridge type class method implementation for the Number type.

See this reference for details.

#tsBridgeOneOf Source

tsBridgeOneOf :: forall a b tok. TsBridgeBy tok a => TsBridgeBy tok b => tok -> Proxy (OneOf a b) -> TsBridgeM TsType

tsBridge type class method implementation for the OneOf type.

See this reference for details.

#tsBridgeOpaqueType Source

tsBridgeOpaqueType :: forall a. { moduleName :: String, typeArgs :: Array (String /\ (TsBridgeM TsType)), typeName :: String } -> Proxy a -> TsBridgeM TsType

tsBridge type class method implementation for opaque types

#tsBridgePromise Source

tsBridgePromise :: forall tok a. TsBridgeBy tok a => tok -> Proxy (Promise a) -> TsBridgeM TsType

tsBridge type class method implementation for the Promise type.

See this reference for details.

#tsBridgeString Source

tsBridgeString :: Proxy String -> TsBridgeM TsType

tsBridge type class method implementation for the String type

See this reference for details.

#tsBridgeTuple Source

tsBridgeTuple :: forall tok a b. TsBridgeBy tok a => TsBridgeBy tok b => tok -> Proxy (Tuple a b) -> TsBridgeM TsType

tsBridge type class method implementation for the Tuple type

See this reference for details.

#tsBridgeTypeVar Source

tsBridgeTypeVar :: forall s. IsSymbol s => Proxy (TypeVar s) -> TsBridgeM TsType

tsBridge type class method implementation for type variables. This is needed because polymorphic values cannot be exported directly. They have to be monomorphized: E.g. something of type Maybe a needs to be typed Maybe (Var "A") to be exported.

#tsBridgeUnit Source

tsBridgeUnit :: Proxy Unit -> TsBridgeM TsType

tsBridge type class method implementation for the Unit type

See this reference for details.