Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: In-text documentation for agents
- Loading branch information
Showing
9 changed files
with
295 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,24 @@ | ||
/** | ||
* Contains mock object that is used in place of registered agent circular references. | ||
* | ||
* Copyright (c) 2018 Joseph R Cowman | ||
* Licensed under MIT License (see https://github.com/regal/regal) | ||
*/ | ||
|
||
// tslint:disable-next-line | ||
true; // This does nothing; it's only so the jsdocs won't conflict | ||
|
||
/** Whether the given object is an `AgentReference`. */ | ||
export const isAgentReference = (o: any): o is AgentReference => | ||
o && (o as AgentReference).refId !== undefined; | ||
|
||
/** | ||
* Mock object that is used in place of registered agent circular references. | ||
*/ | ||
export class AgentReference { | ||
/** | ||
* Constructs a new `AgentReference` in place of a registered agent. | ||
* @param refId The mocked agent's numeric id. | ||
*/ | ||
constructor(public refId: number) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.