function isKeyCredential(credential) {
    return (0, core_util_1.isObjectWithProperties)(credential, ["key"]) && typeof credential.key === "string";
}
Tests an object to determine whether it implements TokenCredential.

@param credential - The assumed TokenCredential to be tested.