mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-13 04:00:33 +08:00
24 lines
601 B
TypeScript
24 lines
601 B
TypeScript
// Type definitions for ProtoBuf.js
|
|
// Project: https://github.com/dcodeIO/ProtoBuf.js
|
|
// Definitions by: Panu Horsmalahti <https://github.com/panuhorsmalahti>
|
|
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
|
|
|
/// <reference path="../node/node.d.ts" />
|
|
|
|
declare module ProtoBuf {
|
|
export interface IBuilder {
|
|
build: <T>() => T;
|
|
}
|
|
|
|
export interface IProtoBufMessage {
|
|
toArrayBuffer(): ArrayBuffer;
|
|
toBuffer(): Buffer;
|
|
}
|
|
|
|
export function loadProtoFile(filePath: string, callback: (builder: IBuilder) => void): any;
|
|
}
|
|
|
|
declare module "protobufjs" {
|
|
export = ProtoBuf;
|
|
}
|