mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
* 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
17 lines
477 B
TypeScript
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
|