Typescript is String CheckOle Ersoy·Follow1 min read·Sep 7, 2020--ListenShareImage by Clker-Free-Vector-Images from PixabayScenarioWe need to check if a variable is a string.Approach/*** @param s* @return true is s is a string false otherwise*/export function isString(s:any) { return (typeof s === 'string' || s instanceof String) ? true : false}