if (actual.class !== this.className) { thrownew Match.MatchError(`Expected Debugger.Object of class ${this.className}, got Debugger.Object of class ${actual.class}`);
}
if (this.props !== undefined) { const lifted = {}; for (const name of actual.getOwnPropertyNames()) { const desc = actual.getOwnPropertyDescriptor(name); if (!('value' in desc)) { thrownew Match.MatchError(`Debugger.Object referent has non-value property ${JSON.stringify(name)}`);
}
lifted[name] = desc.value;
}
// The Debugger API guarantees that various sorts of meta-objects are 1:1 with // their referents, so it's often useful to check that two objects are === in // patterns. class DebuggerIdentical extends Match.Pattern {
constructor(expected) { super(); this.expected = expected;
}
match(actual) { if (actual !== this.expected) { thrownew Pattern.MatchError(`Expected exact value ${uneval(this.expected)}, got ${uneval(actual)}`);
}
}
}
Messung V0.5
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.