adopted-ember-addons / adopted-ember-addons/validated-changeset
Change all apis on the Change, Data, all internal structures to be Symbols in order to not conflict with passed in data
- Lingua principale
- TypeScript
- Stelle
- 38
- Fork
- 27
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Reproduction: https://runkit.com/nullvoxpopuli/reproduction-for-validated-changeset-122
for example,
```js
import { Changeset as createChangeset } from 'validated-changeset';
let data = {
trigger: { ...}
};
let changeset = createChangeset(data)
```
the data, `trigger` conflicts with: https://github.com/validated-changeset/validated-changeset/blob/ca0c7d249fc2244edaeb7aef25bdf06583628efa/src/index.ts#L144
I propose all internal APIS be assigned to private symbols instead of regular keys to not conflict with passed data:
example:
```js
const TRIGGER = Symbol('__private__trigger__');
// ...
[TRIGGER](eventName: string, ...args: any[]): void {
const notifier = notifierForEvent(this, eventName);
if (notifier) {
notifier.trigger(...args);
}
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.