MCPcopy Create free account
hub / github.com/aws/constructs / isConstruct

Method isConstruct

src/construct.ts:524–526  ·  view source on GitHub ↗

* Checks if `x` is a construct. * * Use this method instead of `instanceof` to properly detect `Construct` * instances, even when the construct library is symlinked. * * Explanation: in JavaScript, multiple copies of the `constructs` library on * disk are seen as independent, compl

(x: any)

Source from the content-addressed store, hash-verified

522 * @param x Any object
523 */
524 public static isConstruct(x: any): x is Construct {
525 return x && typeof x === 'object' && x[CONSTRUCT_SYM];
526 }
527
528 /**
529 * The tree node.

Callers 1

construct.test.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected