Typescript Jenis Dukungan Berbeda

function getLength(obj: string | string[]) {
  return obj.length;
}
Puzzled Puffin