利用方法找到map中属性的值
const getPrimaryKey = (resource: string,
primaryKeys: Map<string, PrimaryKey>) => {
return primaryKeys.get(resource) || ['id'];
}
const primaryKey = getPrimaryKey(resource, primaryKeys);
利用方法找到map中属性的值
const getPrimaryKey = (resource: string,
primaryKeys: Map<string, PrimaryKey>) => {
return primaryKeys.get(resource) || ['id'];
}
const primaryKey = getPrimaryKey(resource, primaryKeys);