[file-type] add typings for browser version (#18264)

* [file-type] add typings for browser version

* [file-type] fix url to definitelyTyped repo in header
This commit is contained in:
Dimitri Benin 2017-07-24 19:33:31 +02:00 committed by Andy
parent 0429e70ac5
commit 5bee3a49cb
3 changed files with 9 additions and 8 deletions

View File

@ -1,5 +1,4 @@
"use strict";
import fileType = require("file-type");
import fileType = require("file-type")
fileType(new Buffer([0xFF, 0xD8, 0xFF]))
fileType(new Buffer([0xFF, 0xD8, 0xFF]));
fileType(new Uint8Array([0xFF, 0xD8, 0xFF]));

View File

@ -1,16 +1,17 @@
// Type definitions for file-type
// Type definitions for file-type 5.2
// Project: https://github.com/sindresorhus/file-type
// Definitions by: KIM Jaesuck a.k.a. gim tcaesvk <http://github.com/tcaesvk/>
// Definitions: https://github.com/DefinitelyType/DefinitelyTyped
// BendingBender <http://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
export = FileType;
declare function FileType(buf: Buffer): FileType.FileTypeResult;
declare function FileType(buf: Buffer | Uint8Array): FileType.FileTypeResult;
declare namespace FileType {
export interface FileTypeResult {
interface FileTypeResult {
ext: string;
mime: string;
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }