Skip to content

Commit

Permalink
fix(types): nested object can be a oneof (#1812)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-fenster authored Sep 22, 2022
1 parent 67fe592 commit 119d90a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
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

0 comments on commit 119d90a

Please sign in to comment.