{"version":3,"file":"typeGuard.cjs","names":["isTrackType","thing","type"],"sourceRoot":"../../src","sources":["typeGuard.ts"],"sourcesContent":["import type { Track } from './MediaInfoResult'\n\n/**\n * Checks if a given object is of a specified track type.\n *\n * @template T - The type of track to check for.\n * @param thing - The object to check.\n * @param type - The track type to check against.\n * @returns A boolean indicating whether the object is of the specified track type.\n */\nfunction isTrackType<T extends Track['@type']>(\n  thing: unknown,\n  type: T\n): thing is Extract<Track, { '@type': T }> {\n  return thing !== null && typeof thing === 'object' && (thing as Track)['@type'] === type\n}\n\nexport { isTrackType }\n"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,WAAWA,CAClBC,KAAc,EACdC,IAAO,EACkC;EACzC,OAAOD,KAAK,KAAK,IAAI,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAKA,KAAK,CAAW,OAAO,CAAC,KAAKC,IAAI;AAC1F","ignoreList":[]}