import { toString } from './base' ; export const isDef = < T = any > ( val ? ) : val is T => typeof val !== 'undefined' ; export const isBoolean = ( val ) : val is boolean => typeof val === 'boolean' ; export const isFunction = < T extends Function > ( val ) : val is T => typeof val === 'function' ; export const isNumber = ( val ) : val is number => typeof val === 'number' ; export const isString = ( val ) : val is string => typeof val === 'string' ; export const isObject = ( val ) : val is object => toString ( val ) === '[object Object]' ; export const isWindow = ( val ) : boolean => typeof window !== 'undefined' && toString ( val ) === '[object Window]' ; export const isBrowser = typeof window !== 'undefined' ;