Skip to content

Commit

Permalink
chore(jsdoc): lowercase {object} per gajus/eslint-plugin-jsdoc#855
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed May 2, 2022
1 parent d309e8d commit 4c5509f
Show file tree
Hide file tree
Showing 102 changed files with 368 additions and 368 deletions.
18 changes: 9 additions & 9 deletions packages/ERTP/src/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@

/**
* @template {AssetKind} [K=AssetKind]
* @typedef {Object} DisplayInfo
* @typedef {object} DisplayInfo
* @property {number=} decimalPlaces Tells the display software how
* many decimal places to move the decimal over to the left, or in
* other words, which position corresponds to whole numbers. We
Expand All @@ -96,7 +96,7 @@

/**
* @template {AssetKind} [K=AssetKind]
* @typedef {Object} Brand
* @typedef {object} Brand
* The brand identifies the kind of issuer, and has a function to get the
* alleged name for the kind of asset described. The alleged name (such
* as 'BTC' or 'moola') is provided by the maker of the issuer and should
Expand Down Expand Up @@ -219,7 +219,7 @@

/**
* @template {AssetKind} [K=AssetKind]
* @typedef {Object} Issuer
* @typedef {object} Issuer
*
* The issuer cannot mint a new amount, but it can create empty purses
* and payments. The issuer can also transform payments (splitting
Expand Down Expand Up @@ -253,7 +253,7 @@
*/

/**
* @typedef {Object} AdditionalDisplayInfo
* @typedef {object} AdditionalDisplayInfo
*
* @property {number=} decimalPlaces Tells the display software how
* many decimal places to move the decimal over to the left, or in
Expand Down Expand Up @@ -287,7 +287,7 @@

/**
* @template {AssetKind} [K=AssetKind]
* @typedef {Object} Mint
* @typedef {object} Mint
* Holding a Mint carries the right to issue new digital assets. These
* assets all have the same kind, which is called a Brand.
*
Expand All @@ -303,7 +303,7 @@
*/

/**
* @typedef {Object} DepositFacet
* @typedef {object} DepositFacet
* @property {DepositFacetReceive} receive
* Deposit all the contents of payment into the purse that made this facet,
* returning the amount. If the optional argument `optAmount` does not equal the
Expand All @@ -320,7 +320,7 @@
*/

/**
* @typedef {Object} Purse
* @typedef {object} Purse
* Purses hold amount of digital assets of the same brand, but unlike Payments,
* they are not meant to be sent to others. To transfer digital assets, a
* Payment should be withdrawn from a Purse. The amount of digital
Expand Down Expand Up @@ -368,7 +368,7 @@

/**
* @template {AssetKind} [K=AssetKind]
* @typedef {Object} Payment
* @typedef {object} Payment
* Payments hold amount of digital assets of the same brand in transit. Payments
* can be deposited in purses, split into multiple payments, combined, and
* claimed (getting an exclusive payment). Payments are linear, meaning
Expand All @@ -393,7 +393,7 @@

/**
* @template {AssetKind} K
* @typedef {Object} MathHelpers<K>
* @typedef {object} MathHelpers<K>
* All of the difference in how digital asset amount are manipulated can be
* reduced to the behavior of the math on values. We extract this
* custom logic into mathHelpers. MathHelpers are about value
Expand Down
4 changes: 2 additions & 2 deletions packages/SwingSet/src/controller/initializeSwingset.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const allValues = async obj =>
/**
* Build the source bundles for the kernel and xsnap vat worker.
*
* @param {Object} [options]
* @param {object} [options]
* @param {ModuleFormat} [options.bundleFormat]
*/
export async function buildKernelBundles(options = {}) {
Expand Down Expand Up @@ -84,7 +84,7 @@ function byName(a, b) {
* 'bootstrap.js'.
*
* @param {string} basedir The directory to scan
* @param {Object} [options]
* @param {object} [options]
* @param {boolean} [options.includeDevDependencies] whether to include devDependencies
* @param {ModuleFormat} [options.bundleFormat] the bundle format to use
* @returns {SwingSetConfig} a swingset config object: {
Expand Down
6 changes: 3 additions & 3 deletions packages/SwingSet/src/devices/timer/device-timer.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ function copyState(schedState) {
}

/**
* @typedef {Object} Event
* @typedef {object} Event
* @property {bigint} time
* @property {Array<IndexedHandler>} handlers
*
* @typedef {Object} IndexedHandler
* @typedef {object} IndexedHandler
* @property {number} [index]
* @property {Waker} handler
*
* @typedef {Object} Waker
* @typedef {object} Waker
* @property {(now: bigint) => void} wake
*/

Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/src/kernel/kernelQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { insistMessage } from '../lib/message.js';
import { insistVatID } from '../lib/id.js';

/**
* @param {Object} tools
* @param {object} tools
* @param {KernelKeeper} tools.kernelKeeper Kernel keeper managing persistent kernel state
* @param {(problem: unknown, err?: Error) => void } [tools.panic]
*/
Expand Down
4 changes: 2 additions & 2 deletions packages/SwingSet/src/kernel/state/vatKeeper.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export function makeVatKeeper(
* allocate, we insist that the reachable flag was already set.
*
* @param {string} vatSlot The vat slot of interest
* @param {Object} [options]
* @param {object} [options]
* @param {boolean} [options.setReachable] set the 'reachable' flag on vat exports
* @param {boolean} [options.required] refuse to allocate a missing entry
* @param {boolean} [options.requireNew] require that the entry be newly allocated
Expand Down Expand Up @@ -468,7 +468,7 @@ export function makeVatKeeper(
/**
* Append an entry to the vat's transcript.
*
* @param {Object} entry The transcript entry to append.
* @param {object} entry The transcript entry to append.
*/
function addToTranscript(entry) {
const oldPos = JSON.parse(getRequired(`${vatID}.t.endPosition`));
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/src/kernel/vat-loader/vat-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export function makeVatLoader(stuff) {
*
* @param { Translators } translators
*
* @param {Object} options an options bag. These options are currently understood:
* @param {object} options an options bag. These options are currently understood:
*
* @param {ManagerType} options.managerType
*
Expand Down
10 changes: 5 additions & 5 deletions packages/SwingSet/src/liveslots/virtualObjectManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ const unweakable = new WeakSet();
*
* @param {number} size Maximum number of entries to keep in the cache before
* starting to throw them away.
* @param {(baseRef: string) => Object} fetch Function to retrieve an
* @param {(baseRef: string) => object} fetch Function to retrieve an
* object's raw state from the store by its baseRef
* @param {(baseRef: string, rawState: Object) => void} store Function to
* @param {(baseRef: string, rawState: object) => void} store Function to
* store raw object state by its baseRef
*
* @returns {Object} An LRU cache of (up to) the given size
* @returns {object} An LRU cache of (up to) the given size
*
* This cache is part of the virtual object manager and is not intended to be
* used independently; it is exported only for the benefit of test code.
Expand Down Expand Up @@ -140,7 +140,7 @@ export function makeCache(size, fetch, store) {
* of virtual references.
* @param {() => number} allocateExportID Function to allocate the next object
* export ID for the enclosing vat.
* @param { (val: Object) => string} getSlotForVal A function that returns the
* @param {(val: object) => string} getSlotForVal A function that returns the
* object ID (vref) for a given object, if any. their corresponding export
* IDs
* @param {*} registerValue Function to register a new slot+value in liveSlot's
Expand All @@ -150,7 +150,7 @@ export function makeCache(size, fetch, store) {
* @param {number} cacheSize How many virtual objects this manager should cache
* in memory.
*
* @returns {Object} a new virtual object manager.
* @returns {object} a new virtual object manager.
*
* The virtual object manager allows the creation of persistent objects that do
* not need to occupy memory when they are not in use. It provides five
Expand Down
10 changes: 5 additions & 5 deletions packages/SwingSet/src/liveslots/virtualReferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import { parseVatSlot } from '../lib/parseVatSlots.js';

/**
* @param {*} syscall Vat's syscall object, used to access the vatstore operations.
* @param { (val: Object) => string} getSlotForVal A function that returns the
* @param {(val: object) => string} getSlotForVal A function that returns the
* object ID (vref) for a given object, if any. their corresponding export
* IDs
* @param { (slot: string) => Object} requiredValForSlot A function that
* @param {(slot: string) => object} requiredValForSlot A function that
* converts an object ID (vref) to an object.
* @param {*} FinalizationRegistry Powerful JavaScript intrinsic normally denied
* by SES
Expand Down Expand Up @@ -209,7 +209,7 @@ export function makeVirtualReferenceManager(
* Register information describing a persistent object kind.
*
* @param {string} kindID The kind of persistent object being handle
* @param {(string, boolean) => Object} reanimator Reanimator function for the given kind.
* @param {(string, boolean) => object} reanimator Reanimator function for the given kind.
* @param {(string) => boolean} deleter Deleter function for the given kind.
* @param {boolean} durable Flag indicating if instances survive vat termination
*/
Expand Down Expand Up @@ -274,7 +274,7 @@ export function makeVirtualReferenceManager(
*
* @param {string} baseRef The baseRef of the object being reanimated
*
* @returns {Object} A representative of the object identified by `baseRef`
* @returns {object} A representative of the object identified by `baseRef`
*/
function reanimate(baseRef) {
const { id } = parseVatSlot(baseRef);
Expand Down Expand Up @@ -313,7 +313,7 @@ export function makeVirtualReferenceManager(
* offline data later, we must ensure the Remotable remains alive. This Map
* keeps a strong reference to the Remotable along with its (virtual) refcount.
*/
/** @type {Map<Object, number>} Remotable->refcount */
/** @type {Map<object, number>} Remotable->refcount */
const remotableRefCounts = new Map();

// Note that since presence refCounts are keyed by vref, `processDeadSet` must
Expand Down
6 changes: 3 additions & 3 deletions packages/SwingSet/src/types-external.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export {};
*/

/**
* @typedef {Object} SwingSetConfig a swingset config object
* @typedef {object} SwingSetConfig a swingset config object
* @property {string} [bootstrap]
* @property {boolean} [includeDevDependencies] indicates that
* `devDependencies` of the surrounding `package.json` should be accessible to
Expand All @@ -259,7 +259,7 @@ export {};
*/

/**
* @typedef {Object} SwingSetKernelConfig the config object passed to initializeKernel
* @typedef {object} SwingSetKernelConfig the config object passed to initializeKernel
* @property {string} [bootstrap]
* @property {boolean} [includeDevDependencies] indicates that
* `devDependencies` of the surrounding `package.json` should be accessible to
Expand Down Expand Up @@ -313,7 +313,7 @@ export {};
* tests). MeterControl.isMeteringDisabled()===false does not mean metering is happening, it just
* means that MeterControl isn't disabling it.
*
* @typedef {Object} MeterControl
* @typedef {object} MeterControl
* @property {() => boolean} isMeteringDisabled Ask whether metering is currently disabled.
* @property {*} assertIsMetered
* @property {*} assertNotMetered
Expand Down
4 changes: 2 additions & 2 deletions packages/SwingSet/src/vats/network/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import '@agoric/store/exported.js';
import './types.js';

/**
* @typedef {Object} Router A delimited string router implementation
* @typedef {object} Router A delimited string router implementation
* @property {(addr: string) => [string, Protocol][]} getRoutes Return the match and route in order of preference
* @property {(prefix: string, route: Protocol) => void} register Add a prefix->route to the database
* @property {(prefix: string, route: Protocol) => void} unregister Remove a prefix->route from the database
Expand Down Expand Up @@ -64,7 +64,7 @@ export default function makeRouter() {
});
}
/**
* @typedef {Object} RouterProtocol
* @typedef {object} RouterProtocol
* @property {(prefix: string) => Promise<Port>} bind
* @property {(paths: string[], protocolHandler: ProtocolHandler) => void} registerProtocolHandler
* @property {(prefix: string, protocolHandler: ProtocolHandler) => void} unregisterProtocolHandler
Expand Down
20 changes: 10 additions & 10 deletions packages/SwingSet/src/vats/network/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
*/

/**
* @typedef {Object} Closable A closable object
* @typedef {object} Closable A closable object
* @property {() => Promise<void>} close Terminate the object
*/

/**
* @typedef {Object} Protocol The network Protocol
* @typedef {object} Protocol The network Protocol
* @property {(prefix: Endpoint) => Promise<Port>} bind Claim a port, or if ending in ENDPOINT_SEPARATOR, a fresh name
*/

/**
* @typedef {Object} Port A port that has been bound to a protocol
* @typedef {object} Port A port that has been bound to a protocol
* @property {() => Endpoint} getLocalAddress Get the locally bound name of this port
* @property {(acceptHandler: ListenHandler) => Promise<void>} addListener Begin accepting incoming connections
* @property {(remote: Endpoint, connectionHandler?: ConnectionHandler) => Promise<Connection>} connect Make an outbound connection
Expand All @@ -30,7 +30,7 @@
*/

/**
* @typedef {Object} ListenHandler A handler for incoming connections
* @typedef {object} ListenHandler A handler for incoming connections
* @property {(port: Port, l: ListenHandler) => Promise<void>} [onListen] The listener has been registered
* @property {(port: Port, localAddr: Endpoint, remoteAddr: Endpoint, l: ListenHandler) => Promise<ConnectionHandler>} onAccept A new connection is incoming
* @property {(port: Port, localAddr: Endpoint, remoteAddr: Endpoint, l: ListenHandler) => Promise<void>} [onReject] The connection was rejected
Expand All @@ -39,15 +39,15 @@
*/

/**
* @typedef {Object} Connection
* @typedef {object} Connection
* @property {(packetBytes: Data, opts?: Record<string, any>) => Promise<Bytes>} send Send a packet on the connection
* @property {() => Promise<void>} close Close both ends of the connection
* @property {() => Endpoint} getLocalAddress Get the locally bound name of this connection
* @property {() => Endpoint} getRemoteAddress Get the name of the counterparty
*/

/**
* @typedef {Object} ConnectionHandler A handler for a given Connection
* @typedef {object} ConnectionHandler A handler for a given Connection
* @property {(connection: Connection, localAddr: Endpoint, remoteAddr: Endpoint, c: ConnectionHandler) => void} [onOpen] The connection has been opened
* @property {(connection: Connection, packetBytes: Bytes, c: ConnectionHandler, opts?: Record<string, any>) => Promise<Data>} [onReceive] The connection received a packet
* @property {(connection: Connection, reason?: CloseReason, c?: ConnectionHandler) => Promise<void>} [onClose] The connection has been closed
Expand All @@ -56,14 +56,14 @@
*/

/**
* @typedef {Object} AttemptDescription
* @typedef {object} AttemptDescription
* @property {ConnectionHandler} handler
* @property {Endpoint} [remoteAddress]
* @property {Endpoint} [localAddress]
*/

/**
* @typedef {Object} ProtocolHandler A handler for things the protocol implementation will invoke
* @typedef {object} ProtocolHandler A handler for things the protocol implementation will invoke
* @property {(protocol: ProtocolImpl, p: ProtocolHandler) => Promise<void>} onCreate This protocol is created
* @property {(localAddr: Endpoint, p: ProtocolHandler) => Promise<string>} generatePortID Create a fresh port identifier for this protocol
* @property {(port: Port, localAddr: Endpoint, p: ProtocolHandler) => Promise<void>} onBind A port will be bound
Expand All @@ -74,13 +74,13 @@
* @property {(port: Port, localAddr: Endpoint, remote: Endpoint, c: ConnectionHandler, p: ProtocolHandler) => Promise<AttemptDescription>} onConnect A port initiates an outbound connection
* @property {(port: Port, localAddr: Endpoint, p: ProtocolHandler) => Promise<void>} onRevoke The port is being completely destroyed
*
* @typedef {Object} InboundAttempt An inbound connection attempt
* @typedef {object} InboundAttempt An inbound connection attempt
* @property {(desc: AttemptDescription) => Promise<Connection>} accept Establish the connection
* @property {() => Endpoint} getLocalAddress Return the local address for this attempt
* @property {() => Endpoint} getRemoteAddress Return the remote address for this attempt
* @property {() => Promise<void>} close Abort the attempt
*
* @typedef {Object} ProtocolImpl Things the protocol can do for us
* @typedef {object} ProtocolImpl Things the protocol can do for us
* @property {(prefix: Endpoint) => Promise<Port>} bind Claim a port, or if ending in ENDPOINT_SEPARATOR, a fresh name
* @property {(listenAddr: Endpoint, remoteAddr: Endpoint) => Promise<InboundAttempt>} inbound Make an attempt to connect into this protocol
* @property {(port: Port, remoteAddr: Endpoint, connectionHandler: ConnectionHandler) => Promise<Connection>} outbound Create an outbound connection
Expand Down
8 changes: 4 additions & 4 deletions packages/SwingSet/src/vats/plugin-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ const DEFAULT_WALKER = Far('walker', { walk: pluginRootP => pluginRootP });
*/

/**
* @typedef {Object} PluginManager
* @typedef {object} PluginManager
* @property {LoadPlugin} load
*/

/**
* @typedef {Object} Receiver
* @typedef {object} Receiver
* @property {(index: number, obj: Record<string, any>) => void} dispatch
* @property {(index: number, epoch: number) => void} reset
*/

/**
* @typedef {Object} PluginDevice
* @typedef {object} PluginDevice
* @property {(mod: string) => number} connect
* @property {(receiver: Receiver) => void} registerReceiver
* @property {(index: number, obj: Record<string, any>) => void} send
Expand All @@ -65,7 +65,7 @@ const DEFAULT_WALKER = Far('walker', { walk: pluginRootP => pluginRootP });
*/
export function makePluginManager(pluginDevice, { D, ...vatPowers }) {
/**
* @typedef {Object} AbortDispatch
* @typedef {object} AbortDispatch
* @property {(epoch: number) => void} reset
* @property {(obj: Record<string,any>) => void} dispatch
*/
Expand Down

0 comments on commit 4c5509f

Please sign in to comment.