8779d4ca88
1. Merge enum with expando. 2. Merge enum member with property assignment. 3. Merge interface-declared method declaration with prototype-property-assignment method declaration. The reason that the enum merges crash is that getTypeOfSymbol assumes that symbol flags are (basically) mutually exclusive. This assumption is shredded, badly, for JS merges. One fix is to drop the assumption of exclusivity and instead order cases by least to most likely. This has the highest chance of working, but is also slow, since you would prefer to order cases by most likely *first*, not *last*. The other fix, which is what I did here, is to add a last-chance re-dispatch at the bottom of `getTypeOfVariableOrParameterOrPropertyWorker`. This dispatch uses the valueDeclaration instead of the symbol flags.
22 lines
659 B
TypeScript
22 lines
659 B
TypeScript
// @noEmit: true
|
|
// @allowJs: true
|
|
// @checkJs: true
|
|
// @Filename: lovefield-ts.d.ts
|
|
// bug #27352, crashes from github.com/google/lovefield
|
|
declare namespace lf {
|
|
export interface Transaction {
|
|
attach(query: query.Builder): Promise<Array<Object>>
|
|
begin(scope: Array<schema.Table>): Promise<void>
|
|
commit(): Promise<void>
|
|
exec(queries: Array<query.Builder>): Promise<Array<Array<Object>>>
|
|
rollback(): Promise<void>
|
|
stats(): TransactionStats
|
|
}
|
|
}
|
|
// @Filename: lovefield.js
|
|
lf.Transaction = function() {};
|
|
/**
|
|
* @param {!Array<!lf.schema.Table>} scope
|
|
* @return {!IThenable}
|
|
*/
|
|
lf.Transaction.prototype.begin = function(scope) {};
|