diff --git a/typescript/examples/bag2mcap/typings/protobufjs.d.ts b/typescript/examples/bag2mcap/typings/protobufjs.d.ts deleted file mode 100644 index 8c0445835e..0000000000 --- a/typescript/examples/bag2mcap/typings/protobufjs.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import protobufjs from "protobufjs"; -import descriptor from "protobufjs/ext/descriptor"; - -// https://github.com/protobufjs/protobuf.js/issues/1499 -declare module "protobufjs" { - interface ReflectionObject { - toDescriptor( - protoVersion: string, - ): protobufjs.Message & descriptor.IFileDescriptorSet; - } - declare namespace ReflectionObject { - export const fromDescriptor: (desc: protobufjs.Message) => protobufjs.Root; - } -} diff --git a/typescript/support/src/protobufDescriptors.ts b/typescript/support/src/protobufDescriptors.ts index fb572a7a5b..be61301b80 100644 --- a/typescript/support/src/protobufDescriptors.ts +++ b/typescript/support/src/protobufDescriptors.ts @@ -1,8 +1,16 @@ -// eslint-disable-next-line @typescript-eslint/triple-slash-reference -/// - import protobufjs from "protobufjs"; -import { FileDescriptorSet } from "protobufjs/ext/descriptor"; +import { FileDescriptorSet, IFileDescriptorSet } from "protobufjs/ext/descriptor"; + +// https://github.com/protobufjs/protobuf.js/issues/1499 +declare module "protobufjs" { + interface ReflectionObject { + toDescriptor(protoVersion: string): protobufjs.Message & IFileDescriptorSet; + } + // eslint-disable-next-line @typescript-eslint/no-namespace + namespace ReflectionObject { + const fromDescriptor: (desc: protobufjs.Message) => protobufjs.Root; + } +} export type ProtobufDescriptor = ReturnType; diff --git a/typescript/support/typings/protobufjs.d.ts b/typescript/support/typings/protobufjs.d.ts deleted file mode 100644 index 8c0445835e..0000000000 --- a/typescript/support/typings/protobufjs.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import protobufjs from "protobufjs"; -import descriptor from "protobufjs/ext/descriptor"; - -// https://github.com/protobufjs/protobuf.js/issues/1499 -declare module "protobufjs" { - interface ReflectionObject { - toDescriptor( - protoVersion: string, - ): protobufjs.Message & descriptor.IFileDescriptorSet; - } - declare namespace ReflectionObject { - export const fromDescriptor: (desc: protobufjs.Message) => protobufjs.Root; - } -}