-
I'm currently using `CamelCasedPropertiesDeep` type and I found that it's not copy Date type, instead it creates copy of it. I've got this error
```
Argument of type '{ toString: () => string; toDat…
-
This project is currently using ES6 `Map` and `WeakMap`. There are still quite a few browsers that don't support ES6 features used by people every day, which means that those browsers need polyfills f…
-
It's annoying when you have a value with `unknown` type and can't use it inside `.has()` or `.delete()` function. Which doesn't make sense at all. `unknown` should be allowed and also `.has()` should …
-
```
Object.observe is present in Chrome 36. Object.observe can break the WeakMap
emulation. WeakMap has also been enabled in the same version, so the emulation
will not be used in this case.
Howeve…
-
A possibility raised by defining private state in terms of (unreified) weakmaps is that we can have static private state as well as private methods:
``` js
class Point {
#x;
#y;
#size() { retur…
-
### Map 과 Set Collection
JavaScript 개발에 있어 , 일반 객체를 사용해 해시 맵을 만드는 것은 익숙한 일이였습니다!
ES2015 에서는 보다 안전하고 유연하며 직관적인 방식으로 HashMap 을 활용하도록
특별히 설계된 Map 이라는 프로토타입을 도입했습니다.
#### Map
```javascript
c…
-
How should cache memory management work? Is there a way to get garbage collection by default? (Using WeakMaps for the caches would be ideal…except that WeakMaps do not support primitives as keys.)
…
-
> 旅行的意义在于敞开自己的心扉,去接纳别人看似奇怪却合其理的想法,并相互尊重,成为朋友
**WeakMap与弱引用(Weak Reference)**
今天在改 Fibula.js 代码的时候,我决定引入一个内部的对象来缓存每次都要运行的一个结果集,于是我打算使用`WeakMap`来试试,不过结果却得到了下面的错误:
``` js
TypeError: Invalid value used…
-
Currently NodeType is only defined as a String
It can be great to have a constants / enum definition to avoid to hardcode their usage in our project, like this:
```
export enum NodeType {
Ob…
-
**Description**
`EDITOR_TO_FORCE_RENDER` is set [here](https://github.com/ianstormtaylor/slate/blob/8f2ad02db32f348eb9499e8db1e46d1b705d4d5d/packages/slate-react/src/components/editable.tsx#L163), bu…