Skip to content

Commit 255618e

Browse files
authored
Merge pull request #1916 from murgatroid99/grpc-js_channel_options_permissive
grpc-js: Loosen requirements on channel option types
2 parents fe19844 + 8cc5f6c commit 255618e

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

packages/grpc-js/src/channel.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -177,18 +177,8 @@ export class ChannelImplementation implements Channel {
177177
);
178178
}
179179
if (options) {
180-
if (
181-
typeof options !== 'object' ||
182-
!Object.values(options).every(
183-
(value) =>
184-
typeof value === 'string' ||
185-
typeof value === 'number' ||
186-
typeof value === 'undefined'
187-
)
188-
) {
189-
throw new TypeError(
190-
'Channel options must be an object with string or number values'
191-
);
180+
if (typeof options !== 'object') {
181+
throw new TypeError('Channel options must be an object');
192182
}
193183
}
194184
const originalTargetUri = parseUri(target);

0 commit comments

Comments
 (0)