From 8e83996a3b5f4e8d62484bba6e7030af07e35bef Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 16 Jun 2020 09:47:05 +0100 Subject: [PATCH] demo-protobuf: Fix type of demo.proto --- packages/demo-protobuf/src/demo.proto.ts | 6 +++++- packages/demo-protobuf/types/demo.proto.d.ts | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/demo-protobuf/src/demo.proto.ts b/packages/demo-protobuf/src/demo.proto.ts index c78a4538..a0050a05 100644 --- a/packages/demo-protobuf/src/demo.proto.ts +++ b/packages/demo-protobuf/src/demo.proto.ts @@ -1,4 +1,6 @@ -export default ` +// Without this TS infers this is a string literal. +// eslint-disable-next-line @typescript-eslint/no-inferrable-types +const proto: string = ` syntax = "proto3"; package demo; @@ -6,3 +8,5 @@ message MsgDemo { string example = 1; } `; + +export default proto; diff --git a/packages/demo-protobuf/types/demo.proto.d.ts b/packages/demo-protobuf/types/demo.proto.d.ts index a08652d5..2cad5e4f 100644 --- a/packages/demo-protobuf/types/demo.proto.d.ts +++ b/packages/demo-protobuf/types/demo.proto.d.ts @@ -1,2 +1,2 @@ -declare const _default: '\nsyntax = "proto3";\npackage demo;\n\nmessage MsgDemo {\n string example = 1;\n}\n'; -export default _default; +declare const proto: string; +export default proto;