import { Type , TypeChecker } from "typescript" ; import { PRIMITIVE_TYPE_KINDS , SimpleType } from "../simple-type" ; import { isTypeChecker } from "../utils/ts-util" ; import { isAssignableToSimpleTypeKind } from "./is-assignable-to-simple-type-kind" ; param type param options export function isAssignableToPrimitiveType ( type ) ; export function isAssignableToPrimitiveType ( type , checker ) ; export function isAssignableToPrimitiveType ( type , checkerOrOptions ? ) { const checker = isTypeChecker ( checkerOrOptions ) ? checkerOrOptions : undefined ; return isAssignableToSimpleTypeKind ( type , PRIMITIVE_TYPE_KINDS , checker ! , { matchAny : true } ) ; }