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

Method isConstruct

src/construct.ts:554–556  ·  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

552 * @param x Any object
553 */
554 public static isConstruct(x: any): x is Construct {
555 return x && typeof x === 'object' && x[CONSTRUCT_SYM];
556 }
557
558 /**
559 * The tree node.

Callers 1

construct.test.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected