20. - Тратишь от 2 до ∞ часов в неделю
минусы
Тратить время на OSS
21. - Тратишь от 2 до ∞ часов в неделю
- Сложно обьяснить девушке
минусы
Тратить время на OSS
22. - Тратишь от 2 до ∞ часов в неделю
- Сложно обьяснить девушке
- Сложно обьяснить друзьям
минусы
Тратить время на OSS
23. - Тратишь от 2 до ∞ часов в неделю
- Сложно обьяснить девушке
- Сложно обьяснить друзьям
- Ведьмак 3 так и не пройден
минусы
Тратить время на OSS
24. - Тратишь от 2 до ∞ часов в неделю
- Сложно обьяснить девушке
- Сложно обьяснить друзьям
- Ведьмак 3 так и не пройден
- Материальное разочарование
минусы
Тратить время на OSS
25. - Тратишь от 2 до ∞ часов в неделю
- Сложно обьяснить девушке
- Сложно обьяснить друзьям
- Ведьмак 3 так и не пройден
- Материальное разочарование
- Все равно этим занимаешься
минусы
Тратить время на OSS
26. - Тратишь от 2 до ∞ часов в неделю
- Сложно обьяснить девушке
- Сложно обьяснить друзьям
- Ведьмак 3 так и не пройден
- Материальное разочарование
- Все равно этим занимаешься
минусы-
Тратить время на OSS
✓ Получаешь от 2 до ∞ часов опыта
плюсы
27. - Тратишь от 2 до ∞ часов в неделю
- Сложно обьяснить девушке
- Сложно обьяснить друзьям
- Ведьмак 3 так и не пройден
- Материальное разочарование
- Все равно этим занимаешься
минусы
Тратить время на OSS
✓ Получаешь от 2 до ∞ часов опыта
✓ Легко обьяснить интервьюверу
плюсы
28. - Тратишь от 2 до ∞ часов в неделю
- Сложно обьяснить девушке
- Сложно обьяснить друзьям
- Ведьмак 3 так и не пройден
- Материальное разочарование
- Все равно этим занимаешься
минусы
Тратить время на OSS
✓ Получаешь от 2 до ∞ часов опыта
✓ Легко обьяснить интервьюверу
✓ Легко обьяснить новому клиенту
плюсы
29. - Тратишь от 2 до ∞ часов в неделю
- Сложно обьяснить девушке
- Сложно обьяснить друзьям
- Ведьмак 3 так и не пройден
- Материальное разочарование
- Все равно этим занимаешься
минусы
Тратить время на OSS
✓ Получаешь от 2 до ∞ часов опыта
✓ Легко обьяснить интервьюверу
✓ Легко обьяснить новому клиенту
✓ Ведьмак 3 так и не пройден
плюсы
30. - Тратишь от 2 до ∞ часов в неделю
- Сложно обьяснить девушке
- Сложно обьяснить друзьям
- Ведьмак 3 так и не пройден
- Материальное разочарование
- Все равно этим занимаешься
минусы
Тратить время на OSS
✓ Получаешь от 2 до ∞ часов опыта
✓ Легко обьяснить интервьюверу
✓ Легко обьяснить новому клиенту
✓ Ведьмак 3 так и не пройден
✓ Есть шанс выйти на opencollective
плюсы
31. - Тратишь от 2 до ∞ часов в неделю
- Сложно обьяснить девушке
- Сложно обьяснить друзьям
- Ведьмак 3 так и не пройден
- Материальное разочарование
- Все равно этим занимаешься
минусы
Тратить время на OSS
✓ Получаешь от 2 до ∞ часов опыта
✓ Легко обьяснить интервьюверу
✓ Легко обьяснить новому клиенту
✓ Ведьмак 3 так и не пройден
✓ Есть шанс выйти на opencollective
✓ Все равно этим занимаешься
плюсы
39. class User {
async load() {
await fetch('user');
}
}
function _instanceof(left, right) { if (right != null && typeof
Symbol !== "undefined" && right[Symbol.hasInstance]) { return
right[Symbol.hasInstance](left); } else { return left instanceof
right; } }
function _asyncToGenerator(fn) { return function () { var self =
this, args = arguments; return new Promise(function (resolve,
reject) { var gen = fn.apply(self, args); function step(key,
arg) { try { var info = gen[key](arg); var value = info.value; }
catch (error) { reject(error); return; } if (info.done)
{ resolve(value); } else { Promise.resolve(value).then(_next,
_throw); } } function _next(value) { step("next", value); }
function _throw(err) { step("throw", err); } _next(); }); }; }
function _classCallCheck(instance, Constructor) { if (!
_instanceof(instance, Constructor)) { throw new
TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i <
props.length; i++) { var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true; if ("value" in descriptor)
descriptor.writable = true; Object.defineProperty(target,
descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if
(protoProps) _defineProperties(Constructor.prototype,
protoProps); if (staticProps) _defineProperties(Constructor,
staticProps); return Constructor; }
var User =
/*#__PURE__*/
function () {
function User() {
es6
es5
60. ✓ Не надо добавлять каждого участника для каждого
пакета
✓ Только команда может паблишить пакеты в
определенный scope
✓ Легче отличить “официальные” пакеты от остальных.
✓ Удобно группируются в node_modules
61. ✓ Не надо добавлять каждого участника для каждого
пакета
✓ Только команда может паблишить пакеты в
определенный scope
62. ✓ Не надо добавлять каждого участника для каждого
пакета
✓ Только команда может паблишить пакеты в
определенный scope
✓ Легче отличить “официальные” пакеты от остальных.
63. ✓ Не надо добавлять каждого участника для каждого
пакета
✓ Только команда может паблишить пакеты в
определенный scope
✓ Легче отличить “официальные” пакеты от остальных.
✓ Удобно группируются в node_modules
87. class A {
static b = 'foo';
c = ‘bar';
}
class A {
constructor() {
this.c = 'bar';
}
};
A.b = 'foo';
stage 3: @babel/plugin-proposal-class-properties
88. class A {
static b = 'foo';
c = ‘bar';
}
class A {
constructor() {
this.c = 'bar';
}
};
A.b = 'foo';
stage 3: @babel/plugin-proposal-class-properties
90. class Point {
#x = 0;
getFoo() {
return this.#x;
}
}
var _x;
class Foo {
constructor() {
_x.set(this, 0);
}
getFoo() {
return _x.get(this);
}
}
_x = new WeakMap();
PR #6120
91. class Point {
#x = 0;
getFoo() {
return this.#x;
}
}
var _x;
class Foo {
constructor() {
_x.set(this, 0);
}
getFoo() {
return _x.get(this);
}
}
_x = new WeakMap();
PR #6120
92. class Point {
#x = 0;
getFoo() {
return this.#x;
}
}
var _x;
class Foo {
constructor() {
_x.set(this, 0);
}
getFoo() {
return _x.get(this);
}
}
_x = new WeakMap();
PR #6120
93. class Point {
private x;
constructor(x) {
this.x = x;
}
}
const point = new Point(2);
b.x = 5; // TypeError ?
Why not `private foo` ?
106. // no parameter decorators (a separate proposal)
class Foo {
constructor(@foo x) {}
}
// no decorators on object methods
var o = {
@baz
foo() {}
}
// decorator cannot be attached to the export
@foo
export default class {}
что теперь нельзя
107. // no parameter decorators (a separate proposal)
class Foo {
constructor(@foo x) {}
}
// no decorators on object methods
var o = {
@baz
foo() {}
}
// decorator cannot be attached to the export
@foo
export default class {}
что теперь нельзя
108. // no parameter decorators (a separate proposal)
class Foo {
constructor(@foo x) {}
}
// no decorators on object methods
var o = {
@baz
foo() {}
}
// decorator cannot be attached to the export
@foo
export default class {}
что теперь нельзя
109. // decorators with a call expression
@foo('bar')
class A {
// decorators on computed methods
@autobind
[method](arg) {}
// decorators on generator functions
@deco
*gen() {}
// decorators with a member expression
@a.b.c(e, f)
m() {}
}
// exported decorator classes
export default @foo class {}
что можно
110. // decorators with a call expression
@foo('bar')
class A {
// decorators on computed methods
@autobind
[method](arg) {}
// decorators on generator functions
@deco
*gen() {}
// decorators with a member expression
@a.b.c(e, f)
m() {}
}
// exported decorator classes
export default @foo class {}
что можно
111. // decorators with a call expression
@foo('bar')
class A {
// decorators on computed methods
@autobind
[method](arg) {}
// decorators on generator functions
@deco
*gen() {}
// decorators with a member expression
@a.b.c(e, f)
m() {}
}
// exported decorator classes
export default @foo class {}
что можно
112. // decorators with a call expression
@foo('bar')
class A {
// decorators on computed methods
@autobind
[method](arg) {}
// decorators on generator functions
@deco
*gen() {}
// decorators with a member expression
@a.b.c(e, f)
m() {}
}
// exported decorator classes
export default @foo class {}
что можно
113. // decorators with a call expression
@foo('bar')
class A {
// decorators on computed methods
@autobind
[method](arg) {}
// decorators on generator functions
@deco
*gen() {}
// decorators with a member expression
@a.b.c(e, f)
m() {}
}
// exported decorator classes
export default @foo class {}
что можно
129. > npm install babel-preset-es2015
WARN deprecated babel-preset-latest@6.24.1: We're super 😸 excited that
you're trying to use ES2017+ syntax, but instead of making more yearly
presets 😭 , Babel now has a better preset that we recommend you use
instead: npm install babel-preset-env --save-dev. preset-env without
options will compile ES2015+ down to ES5 just like using all the presets
together and thus is more future proof. It also allows you to target
specific browsers so that Babel can do less work and you can ship native
ES2015+ to user 😎 ! We are also in the process of releasing v7, so
please give http://babeljs.io/blog/2017/09/12/planning-for-7.0 a read
and help test it out in beta! Thanks so much for using Babel 🙏, please
give us a follow on Twitter @babeljs for news on Babel, join
slack.babeljs.io for discussion/development and help support the project
at opencollective.com/babel
131. class User {
async load() {
await fetch('user');
}
}
function _instanceof(left, right) { if (right != null && typeof Symbol !==
"undefined" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance]
(left); } else { return left instanceof right; } }
function _asyncToGenerator(fn) { return function () { var self = this, args =
arguments; return new Promise(function (resolve, reject) { var gen =
fn.apply(self, args); function step(key, arg) { try { var info = gen[key]
(arg); var value = info.value; } catch (error) { reject(error); return; } if
(info.done) { resolve(value); } else { Promise.resolve(value).then(_next,
_throw); } } function _next(value) { step("next", value); } function
_throw(err) { step("throw", err); } _next(); }); }; }
function _classCallCheck(instance, Constructor) { if (!_instanceof(instance,
Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length;
i++) { var descriptor = props[i]; descriptor.enumerable =
descriptor.enumerable || false; descriptor.configurable = true; if ("value"
in descriptor) descriptor.writable = true; Object.defineProperty(target,
descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps)
_defineProperties(Constructor.prototype, protoProps); if (staticProps)
_defineProperties(Constructor, staticProps); return Constructor; }
var User =
/*#__PURE__*/
function () {
function User() {
_classCallCheck(this, User);
}
…
134. function _instanceof(left, right) { if (right != null && typeof Symbol !==
"undefined" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance]
(left); } else { return left instanceof right; } }
function _asyncToGenerator(fn) { return function () { var self = this, args =
arguments; return new Promise(function (resolve, reject) { var gen =
fn.apply(self, args); function step(key, arg) { try { var info = gen[key]
(arg); var value = info.value; } catch (error) { reject(error); return; } if
(info.done) { resolve(value); } else { Promise.resolve(value).then(_next,
_throw); } } function _next(value) { step("next", value); } function
_throw(err) { step("throw", err); } _next(); }); }; }
function _classCallCheck(instance, Constructor) { if (!_instanceof(instance,
Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length;
i++) { var descriptor = props[i]; descriptor.enumerable =
descriptor.enumerable || false; descriptor.configurable = true; if ("value"
in descriptor) descriptor.writable = true; Object.defineProperty(target,
descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps)
_defineProperties(Constructor.prototype, protoProps); if (staticProps)
_defineProperties(Constructor, staticProps); return Constructor; }
var User =
/*#__PURE__*/
function () {
function User() {
_classCallCheck(this, User);
}
В 9 из 10 раз клиенты получают это
135. а было бы неплохо
class User {
async load() {
await fetch('user');
}
}