Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): nested object can be a oneof #1812

Merged
merged 1 commit into from
Sep 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ export interface INamespace {
type AnyExtensionField = (IExtensionField|IExtensionMapField);

/** Any nested object descriptor. */
type AnyNestedObject = (IEnum|IType|IService|AnyExtensionField|INamespace);
type AnyNestedObject = (IEnum|IType|IService|AnyExtensionField|INamespace|IOneOf);

/** Base class of all reflection objects. */
export abstract class ReflectionObject {
Expand Down
3 changes: 1 addition & 2 deletions src/namespace.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,8 @@ Object.defineProperty(Namespace.prototype, "nestedArray", {
/**
* Any nested object descriptor.
* @typedef AnyNestedObject
* @type {IEnum|IType|IService|AnyExtensionField|INamespace}
* @type {IEnum|IType|IService|AnyExtensionField|INamespace|IOneOf}
*/
// ^ BEWARE: VSCode hangs forever when using more than 5 types (that's why AnyExtensionField exists in the first place)

/**
* Converts this namespace to a namespace descriptor.
Expand Down