Files
DefinitelyTyped/types/exif-reader/exif-reader-tests.ts
Andrzej Wódkiewicz f65dd44746 🤖 Merge PR #62942 feat: add typings for exif-reader by @akwodkiewicz
* feat: add typings for exif-reader

* fix: correct tslint.json "extends"

* fix: remove dangling comma from tsconfig.json

* fix: remove patch version from header

* fix: declare export as CommonJS
2022-10-28 13:57:39 -07:00

17 lines
477 B
TypeScript

import exifReader = require("exif-reader");
const buf = Buffer.from("some-exif-data");
const result = exifReader(buf);
console.log(result.exif);
console.log(result.gps);
console.log(result.image);
console.log(result.interoperability);
console.log(result.thumbnail);
// These records contain a variety of tags
console.log(result.gps?.GPSVersionID);
// But the list of valid tags is not provided in these typings
console.log(result.exif?.ThisTagDoesNotExist); // should pass