stampit API
Search…
Introduction
Essentials
What is a Stamp
Installation
Specification
FAQ
API
Quick start
Basics
Methods
Properties
Deep properties
Initializers
Static properties
Static deep properties
Configuration
Deep configuration
Composers
Property descriptors
Static property descriptors
Name
Ecosystem
Ecosystem Overview
@stamp/collision
@stamp/required
@stamp/privatize
@stamp/named (DEPRECATED)
@stamp/instanceof
Powered By
GitBook
FAQ
Q: What if composed stamps have same named property/method/etc?
The last composed property/method/etc wins. In other words, you can overwrite everything when composing stamps.
Q: But what if there are names conflicts during stamp composition?
In our practice the names never collide. Because stamps tend to stay very small thanks to its absolute freedom.
But if you still need to avoid name collision or protect a method from overwriting then use
@stamp/collision
utility stamp.
Q: Why stampit is ES5? Should it be ES6 or later?
The main advantage of ES6 is the
import/export
syntax which enables easy
treeshaking
. But:
There is nothing to treeshake in
stampit
or
@stamp/it
.
stampit
is already 1.5KB gzipped.
Maintaining ES6->ES5 is quite hard in such a specific project.
Most projects still transpile from ESNext to ES5.
We will rethink this policy as soon as there is a need which cannot be solved with ES5.
Previous
Object creation internals
Next - API
Quick start
Last modified
2yr ago
Copy link
Contents
Q: What if composed stamps have same named property/method/etc?
Q: But what if there are names conflicts during stamp composition?
Q: Why stampit is ES5? Should it be ES6 or later?