Could JavaScript have its own native type system like TypeScript in the future? The team behind TS has submitted an ECMAScript TC39 proposal that seeks to add "Types as Comments" to JS. 

#js #webdev #TheCodeReport

🔗 Resources

JS Types Blog Post https://devblogs.microsoft.com/typescript/a-proposal-for-type-syntax-in-javascript/
TC39 Proposal https://github.com/giltayar/proposal-types-as-comments/
History of JavaScript https://youtu.be/Sh6lK57Cuk4
React 18 https://reactjs.org/blog/2022/03/08/react-18-upgrade-guide.html
M1 Mac Studio https://www.apple.com/mac-studio/

🔥 Get More Content - Upgrade to PRO

Upgrade to Fireship PRO at https://fireship.io/pro
Use code lORhwXd2 for 25% off your first payment. 

🎨 My Editor Settings

- Atom One Dark 
- vscode-icons
- Fira Code Font

🔖 Topics Covered

- News about new JS features
- Native JS type system
- How TC39 works
- React 18 release candidate
- Apple Mac Studio M1 Ultra
2024-02-04T13:39:45.708Z
nova-2
2-general-nova
2024-01-09.29447
30089e05-99d1-4376-b32e-c263170674af
cc103efb-c838-4f77-b51d-46a49672ae9f
4e4430d795f1e140062a80cdbecbce9e271d982a67623d6b9bfcaeed8c5f2510
67875a7f-c9c4-48a0-aa55-5bdb8a91c34a
deprecated
It is March 10, 2022, and you're watching the code report.
TypeScript will turn 10 years old in October of this year.
In the early days, it was only used by squares working at big mega corporations.
Today, even that dude at the coffee shop with a man bun drinking a with latte coding on his m one MacBook is loving TypeScript.
On the state of JavaScript survey, types were the number one missing feature.
Apparently, e people like to catch bugs before they get shipped to production.
But there's still one thing that we can all agree to hate about TypeScript, the build step, or transpiling your TypeScript code back into vanilla JavaScript.
It takes time and requires you to think about annoying configuration details.
Wouldn't it be nice if TypeScript just worked in the browser without to build step.
Well, that dream might become a reality someday because the team behind TypeScript just submitted a TC 39 proposal that would bring native types into the ECMA script standard, a k a the JavaScript programming language.
Before you celebrate though, keep in mind that many TC 39 proposals fail, and this is just at stage 0, which means it hasn't even been presented to the important people yet.
A proposal needs to go through 4 stages before it gets implemented into the ECMAScript standard.
This process can take years, and it may never get there at all.
Back in the early 2000, there was a version of JavaScript called ES 4.
Or it was going to include a type system, but everybody disagreed on it so much that they just threw that entire version of JavaScript in the garbage, and skipped ahead to ES 5.
That was probably at best because today, TypeScript gives us a very good idea of what a type system for JavaScript should look like.
But does that mean that every browser and runtime like Node.
Js will need to implement the TypeScript compiler?
No.
Actually, the way it works is pretty clever.
If we look closely, the proposal says types as comments.
In JavaScript, you can use JS dot comments in vanilla JavaScript, then use a TS check comment to get type checking in a plain JavaScript file.
That's pretty cool because you get the awesome IntelliSense of TypeScript without the need for a build step because comments are totally ignored by the browser.
The drawback is that nobody wants to write comments like this.
They're really clunky and awkward.
What the proposal aims to do is add an optional syntax to JavaScript that would be totally ignored by any engine that runs the code, just like a comment.
That means you could add type annotations to your code, but the code would run just like regular JavaScript because the type annotations are treated just like comments, but can be used by tools like TypeScript, Flow, and your IDE e to provide an awesome developer experience.
It's a very noninvasive approach that could be implemented without tearing apart the existing JavaScript ecosystem.
Let's take a moment to pray for its success.
In other news, React 18 is now a release candidate.
Its big new feature is concurrent rendering, which opens up new UI design patterns with suspense.
Also, Apple just released a new desktop computer called the Mac Studio with a ridiculous 20 core m 1 ultra chip and an even more ridiculous, $4,000 price tag.
Don't worry though, that'll look cheap pretty soon because inflation just set a new 4 year high today.
Not to worry though, your friends over at the Federal Reserve are coming out this strong with a quarter percentage rate hike maybe at some point in the future.
This has been the Code Report.
Thanks for watching, and I will see you in the next one.

Speaker 0: It is March 10, 2022, and you're watching the code report. TypeScript will turn 10 years old in October of this year. In the early days, it was only used by squares working at big mega corporations. Today, even that dude at the coffee shop with a man bun drinking a with latte coding on his m one MacBook is loving TypeScript. On the state of JavaScript survey, types were the number one missing feature.

Apparently, e people like to catch bugs before they get shipped to production. But there's still one thing that we can all agree to hate about TypeScript, the build step, or transpiling your TypeScript code back into vanilla JavaScript. It takes time and requires you to think about annoying configuration details. Wouldn't it be nice if TypeScript just worked in the browser without to build step. Well, that dream might become a reality someday because the team behind TypeScript just submitted a TC 39 proposal that would bring native types into the ECMA script standard, a k a the JavaScript programming language.

Before you celebrate though, keep in mind that many TC 39 proposals fail, and this is just at stage 0, which means it hasn't even been presented to the important people yet. A proposal needs to go through 4 stages before it gets implemented into the ECMAScript standard. This process can take years, and it may never get there at all. Back in the early 2000, there was a version of JavaScript called ES 4. Or it was going to include a type system, but everybody disagreed on it so much that they just threw that entire version of JavaScript in the garbage, and skipped ahead to ES 5.

That was probably at best because today, TypeScript gives us a very good idea of what a type system for JavaScript should look like. But does that mean that every browser and runtime like Node. Js will need to implement the TypeScript compiler? No. Actually, the way it works is pretty clever.

If we look closely, the proposal says types as comments. In JavaScript, you can use JS dot comments in vanilla JavaScript, then use a TS check comment to get type checking in a plain JavaScript file. That's pretty cool because you get the awesome IntelliSense of TypeScript without the need for a build step because comments are totally ignored by the browser. The drawback is that nobody wants to write comments like this. They're really clunky and awkward.

What the proposal aims to do is add an optional syntax to JavaScript that would be totally ignored by any engine that runs the code, just like a comment. That means you could add type annotations to your code, but the code would run just like regular JavaScript because the type annotations are treated just like comments, but can be used by tools like TypeScript, Flow, and your IDE e to provide an awesome developer experience. It's a very noninvasive approach that could be implemented without tearing apart the existing JavaScript ecosystem. Let's take a moment to pray for its success. In other news, React 18 is now a release candidate.

Its big new feature is concurrent rendering, which opens up new UI design patterns with suspense. Also, Apple just released a new desktop computer called the Mac Studio with a ridiculous 20 core m 1 ultra chip and an even more ridiculous, $4,000 price tag. Don't worry though, that'll look cheap pretty soon because inflation just set a new 4 year high today. Not to worry though, your friends over at the Federal Reserve are coming out this strong with a quarter percentage rate hike maybe at some point in the future. This has been the Code Report.

Thanks for watching, and I will see you in the next one.
It is March 10, 2022, and you're watching the code report. TypeScript will turn 10 years old in October of this year. In the early days, it was only used by squares working at big mega corporations.
Today, even that dude at the coffee shop with a man bun drinking a with latte coding on his m one MacBook is loving TypeScript. On the state of JavaScript survey, types were the number one missing feature. Apparently, e people like to catch bugs before they get shipped to production.
bugs
But there's still one thing that we can all agree to hate about TypeScript, the build step, or transpiling your TypeScript code back into vanilla JavaScript. It takes time and requires you to think about annoying configuration details. Wouldn't it be nice if TypeScript just worked in the browser without to build step. Well, that dream might become a reality someday because the team behind TypeScript just submitted a TC 39 proposal that would bring native types into the ECMA script standard, a k a the JavaScript programming language. Before you celebrate though, keep in mind that many TC 39 proposals fail, and this is just at stage 0, which means it hasn't even been presented to the important people yet. A proposal needs to go through 4 stages before it gets implemented into the ECMAScript standard. This process can take years, and it may never get there at all. Back in the early 2000, there was a version of JavaScript called ES 4. Or it was going to include a type system, but everybody disagreed on it so much that they just threw that entire version of JavaScript in the garbage, and skipped ahead to ES 5. That was probably at best because today, TypeScript gives us a very good idea of what a type system for JavaScript should look like. But does that mean that every browser and runtime like Node. Js will need to implement the TypeScript compiler? No. Actually, the way it works is pretty clever. If we look closely, the proposal says types as comments. In JavaScript, you can use JS dot comments in vanilla JavaScript, then use a TS check comment to get type checking in a plain JavaScript file. That's pretty cool because you get the awesome IntelliSense of TypeScript without the need for a build step because comments are totally ignored by the browser. The drawback is that nobody wants to write comments like this. They're really clunky and awkward. What the proposal aims to do is add an optional syntax to JavaScript that would be totally ignored by any engine that runs the code, just like a comment.
That means you could add type annotations to your code, but the code would run just like regular JavaScript because the type annotations are treated just like comments, but can be used by tools like TypeScript, Flow, and your IDE e to provide an awesome developer experience. It's a very noninvasive approach that could be implemented without tearing apart the existing JavaScript ecosystem.
ideologies
Let's take a moment to pray for its success. In other news, React 18 is now a release candidate. Its big new feature is concurrent rendering, which opens up new UI design patterns with suspense.
Also, Apple just released a new desktop computer called the Mac Studio with a ridiculous 20 core m 1 ultra chip and an even more ridiculous, $4,000 price tag. Don't worry though, that'll look cheap pretty soon because inflation just set a new 4 year high today. Not to worry though, your friends over at the Federal Reserve are coming out this strong with a quarter percentage rate hike maybe at some point in the future. This has been the Code Report.
inflation
apple
Thanks for watching, and I will see you in the next one.
It is March 10, 2022, and you're watching the code report. TypeScript will turn 10 years old in October of this year. In the early days, it was only used by squares working at big mega corporations. Today, even that dude at the coffee shop with a man bun drinking a with latte coding on his m one MacBook is loving TypeScript. On the state of JavaScript survey, types were the number one missing feature. Apparently, e people like to catch bugs before they get shipped to production. But there's still one thing that we can all agree to hate about TypeScript, the build step, or transpiling your TypeScript code back into vanilla JavaScript. It takes time and requires you to think about annoying configuration details. Wouldn't it be nice if TypeScript just worked in the browser without to build step. Well, that dream might become a reality someday because the team behind TypeScript just submitted a TC 39 proposal that would bring native types into the ECMA script standard, a k a the JavaScript programming language. Before you celebrate though, keep in mind that many TC 39 proposals fail, and this is just at stage 0, which means it hasn't even been presented to the important people yet. A proposal needs to go through 4 stages before it gets implemented into the ECMAScript standard. This process can take years, and it may never get there at all. Back in the early 2000, there was a version of JavaScript called ES 4. Or it was going to include a type system, but everybody disagreed on it so much that they just threw that entire version of JavaScript in the garbage, and skipped ahead to ES 5. That was probably at best because today, TypeScript gives us a very good idea of what a type system for JavaScript should look like. But does that mean that every browser and runtime like Node. Js will need to implement the TypeScript compiler? No. Actually, the way it works is pretty clever. If we look closely, the proposal says types as comments. In JavaScript, you can use JS dot comments in vanilla JavaScript, then use a TS check comment to get type checking in a plain JavaScript file. That's pretty cool because you get the awesome IntelliSense of TypeScript without the need for a build step because comments are totally ignored by the browser. The drawback is that nobody wants to write comments like this. They're really clunky and awkward. What the proposal aims to do is add an optional syntax to JavaScript that would be totally ignored by any engine that runs the code, just like a comment. That means you could add type annotations to your code, but the code would run just like regular JavaScript because the type annotations are treated just like comments, but can be used by tools like TypeScript, Flow, and your IDE e to provide an awesome developer experience. It's a very noninvasive approach that could be implemented without tearing apart the existing JavaScript ecosystem. Let's take a moment to pray for its success. In other news, React 18 is now a release candidate. Its big new feature is concurrent rendering, which opens up new UI design patterns with suspense. Also, Apple just released a new desktop computer called the Mac Studio with a ridiculous 20 core m 1 ultra chip and an even more ridiculous, $4,000 price tag. Don't worry though, that'll look cheap pretty soon because inflation just set a new 4 year high today. Not to worry though, your friends over at the Federal Reserve are coming out this strong with a quarter percentage rate hike maybe at some point in the future. This has been the Code Report. Thanks for watching, and I will see you in the next one.
It
it
is
is
March
march
10,
10
2022,
2022
and
and
you're
you're
watching
watching
the
the
code
code
report.
report
TypeScript
typescript
will
will
turn
turn
10
10
years
years
old
old
in
in
October
october
of
of
this
this
year.
year
In
in
the
the
early
early
days,
days
it
it
was
was
only
only
used
used
by
by
squares
squares
working
working
at
at
big
big
mega
mega
corporations.
corporations
Today,
today
even
even
that
that
dude
dude
at
at
the
the
coffee
coffee
shop
shop
with
with
a
a
man
man
bun
bun
drinking
drinking
a
a
with
with
latte
latte
coding
coding
on
on
his
his
m
m
one
one
MacBook
macbook
is
is
loving
loving
TypeScript.
typescript
On
on
the
the
state
state
of
of
JavaScript
javascript
survey,
survey
types
types
were
were
the
the
number
number
one
one
missing
missing
feature.
feature
Apparently,
apparently
e
e
people
people
like
like
to
to
catch
catch
bugs
bugs
before
before
they
they
get
get
shipped
shipped
to
to
production.
production
But
but
there's
there's
still
still
one
one
thing
thing
that
that
we
we
can
can
all
all
agree
agree
to
to
hate
hate
about
about
TypeScript,
typescript
the
the
build
build
step,
step
or
or
transpiling
transpiling
your
your
TypeScript
typescript
code
code
back
back
into
into
vanilla
vanilla
JavaScript.
javascript
It
it
takes
takes
time
time
and
and
requires
requires
you
you
to
to
think
think
about
about
annoying
annoying
configuration
configuration
details.
details
Wouldn't
wouldn't
it
it
be
be
nice
nice
if
if
TypeScript
typescript
just
just
worked
worked
in
in
the
the
browser
browser
without
without
to
to
build
build
step.
step
Well,
well
that
that
dream
dream
might
might
become
become
a
a
reality
reality
someday
someday
because
because
the
the
team
team
behind
behind
TypeScript
typescript
just
just
submitted
submitted
a
a
TC
tc
39
39
proposal
proposal
that
that
would
would
bring
bring
native
native
types
types
into
into
the
the
ECMA
ecma
script
script
standard,
standard
a
a
k
k
a
a
the
the
JavaScript
javascript
programming
programming
language.
language
Before
before
you
you
celebrate
celebrate
though,
though
keep
keep
in
in
mind
mind
that
that
many
many
TC
tc
39
39
proposals
proposals
fail,
fail
and
and
this
this
is
is
just
just
at
at
stage
stage
0,
0
which
which
means
means
it
it
hasn't
hasn't
even
even
been
been
presented
presented
to
to
the
the
important
important
people
people
yet.
yet
A
a
proposal
proposal
needs
needs
to
to
go
go
through
through
4
4
stages
stages
before
before
it
it
gets
gets
implemented
implemented
into
into
the
the
ECMAScript
ecmascript
standard.
standard
This
this
process
process
can
can
take
take
years,
years
and
and
it
it
may
may
never
never
get
get
there
there
at
at
all.
all
Back
back
in
in
the
the
early
early
2000,
2000
there
there
was
was
a
a
version
version
of
of
JavaScript
javascript
called
called
ES
es
4.
4
Or
or
it
it
was
was
going
going
to
to
include
include
a
a
type
type
system,
system
but
but
everybody
everybody
disagreed
disagreed
on
on
it
it
so
so
much
much
that
that
they
they
just
just
threw
threw
that
that
entire
entire
version
version
of
of
JavaScript
javascript
in
in
the
the
garbage,
garbage
and
and
skipped
skipped
ahead
ahead
to
to
ES
es
5.
5
That
that
was
was
probably
probably
at
at
best
best
because
because
today,
today
TypeScript
typescript
gives
gives
us
us
a
a
very
very
good
good
idea
idea
of
of
what
what
a
a
type
type
system
system
for
for
JavaScript
javascript
should
should
look
look
like.
like
But
but
does
does
that
that
mean
mean
that
that
every
every
browser
browser
and
and
runtime
runtime
like
like
Node.
node
Js
js
will
will
need
need
to
to
implement
implement
the
the
TypeScript
typescript
compiler?
compiler
No.
no
Actually,
actually
the
the
way
way
it
it
works
works
is
is
pretty
pretty
clever.
clever
If
if
we
we
look
look
closely,
closely
the
the
proposal
proposal
says
says
types
types
as
as
comments.
comments
In
in
JavaScript,
javascript
you
you
can
can
use
use
JS
js
dot
dot
comments
comments
in
in
vanilla
vanilla
JavaScript,
javascript
then
then
use
use
a
a
TS
ts
check
check
comment
comment
to
to
get
get
type
type
checking
checking
in
in
a
a
plain
plain
JavaScript
javascript
file.
file
That's
that's
pretty
pretty
cool
cool
because
because
you
you
get
get
the
the
awesome
awesome
IntelliSense
intellisense
of
of
TypeScript
typescript
without
without
the
the
need
need
for
for
a
a
build
build
step
step
because
because
comments
comments
are
are
totally
totally
ignored
ignored
by
by
the
the
browser.
browser
The
the
drawback
drawback
is
is
that
that
nobody
nobody
wants
wants
to
to
write
write
comments
comments
like
like
this.
this
They're
they're
really
really
clunky
clunky
and
and
awkward.
awkward
What
what
the
the
proposal
proposal
aims
aims
to
to
do
do
is
is
add
add
an
an
optional
optional
syntax
syntax
to
to
JavaScript
javascript
that
that
would
would
be
be
totally
totally
ignored
ignored
by
by
any
any
engine
engine
that
that
runs
runs
the
the
code,
code
just
just
like
like
a
a
comment.
comment
That
that
means
means
you
you
could
could
add
add
type
type
annotations
annotations
to
to
your
your
code,
code
but
but
the
the
code
code
would
would
run
run
just
just
like
like
regular
regular
JavaScript
javascript
because
because
the
the
type
type
annotations
annotations
are
are
treated
treated
just
just
like
like
comments,
comments
but
but
can
can
be
be
used
used
by
by
tools
tools
like
like
TypeScript,
typescript
Flow,
flow
and
and
your
your
IDE
ide
e
e
to
to
provide
provide
an
an
awesome
awesome
developer
developer
experience.
experience
It's
it's
a
a
very
very
noninvasive
noninvasive
approach
approach
that
that
could
could
be
be
implemented
implemented
without
without
tearing
tearing
apart
apart
the
the
existing
existing
JavaScript
javascript
ecosystem.
ecosystem
Let's
let's
take
take
a
a
moment
moment
to
to
pray
pray
for
for
its
its
success.
success
In
in
other
other
news,
news
React
react
18
18
is
is
now
now
a
a
release
release
candidate.
candidate
Its
its
big
big
new
new
feature
feature
is
is
concurrent
concurrent
rendering,
rendering
which
which
opens
opens
up
up
new
new
UI
ui
design
design
patterns
patterns
with
with
suspense.
suspense
Also,
also
Apple
apple
just
just
released
released
a
a
new
new
desktop
desktop
computer
computer
called
called
the
the
Mac
mac
Studio
studio
with
with
a
a
ridiculous
ridiculous
20
20
core
core
m
m
1
1
ultra
ultra
chip
chip
and
and
an
an
even
even
more
more
ridiculous,
ridiculous
$4,000
$4,000
price
price
tag.
tag
Don't
don't
worry
worry
though,
though
that'll
that'll
look
look
cheap
cheap
pretty
pretty
soon
soon
because
because
inflation
inflation
just
just
set
set
a
a
new
new
4
4
year
year
high
high
today.
today
Not
not
to
to
worry
worry
though,
though
your
your
friends
friends
over
over
at
at
the
the
Federal
federal
Reserve
reserve
are
are
coming
coming
out
out
this
this
strong
strong
with
with
a
a
quarter
quarter
percentage
percentage
rate
rate
hike
hike
maybe
maybe
at
at
some
some
point
point
in
in
the
the
future.
future
This
this
has
has
been
been
the
the
Code
code
Report.
report
Thanks
thanks
for
for
watching,
watching
and
and
I
i
will
will
see
see
you
you
in
in
the
the
next
next
one.
one
success
In this video, Speaker 0 discusses TypeScript, a program that would make it easier to build TypeScript code for vanilla JavaScript. He explains that a proposal would involve four stages before implemented into the Workflow standard, but many proposals fail. He also mentions a release candidate for React 18, including a new desktop computer and a rate hike from the Federal Reserve.
A heroic new proposal for JavaScript // The Code Report
It is March 10, 2022, and you're watching the code report. TypeScript will turn 10 years old in October of this year. In the early days, it was only used by squares working at big mega corporations. Today, even that dude at the coffee shop with a man bun drinking a with latte coding on his m one MacBook is loving TypeScript. On the state of JavaScript survey, types were the number one missing feature. Apparently, e people like to catch bugs before they get shipped to production. But there's still one thing that we can all agree to hate about TypeScript, the build step, or transpiling your TypeScript code back into vanilla JavaScript. It takes time and requires you to think about annoying configuration details. Wouldn't it be nice if TypeScript just worked in the browser without to build step. Well, that dream might become a reality someday because the team behind TypeScript just submitted a TC 39 proposal that would bring native types into the ECMA script standard, a k a the JavaScript programming language. Before you celebrate though, keep in mind that many TC 39 proposals fail, and this is just at stage 0, which means it hasn't even been presented to the important people yet. A proposal needs to go through 4 stages before it gets implemented into the ECMAScript standard. This process can take years, and it may never get there at all. Back in the early 2000, there was a version of JavaScript called ES 4. Or it was going to include a type system, but everybody disagreed on it so much that they just threw that entire version of JavaScript in the garbage, and skipped ahead to ES 5. That was probably at best because today, TypeScript gives us a very good idea of what a type system for JavaScript should look like. But does that mean that every browser and runtime like Node. Js will need to implement the TypeScript compiler? No. Actually, the way it works is pretty clever. If we look closely, the proposal says types as comments. In JavaScript, you can use JS dot comments in vanilla JavaScript, then use a TS check comment to get type checking in a plain JavaScript file. That's pretty cool because you get the awesome IntelliSense of TypeScript without the need for a build step because comments are totally ignored by the browser. The drawback is that nobody wants to write comments like this. They're really clunky and awkward. What the proposal aims to do is add an optional syntax to JavaScript that would be totally ignored by any engine that runs the code, just like a comment. That means you could add type annotations to your code, but the code would run just like regular JavaScript because the type annotations are treated just like comments, but can be used by tools like TypeScript, Flow, and your IDE e to provide an awesome developer experience. It's a very noninvasive approach that could be implemented without tearing apart the existing JavaScript ecosystem. Let's take a moment to pray for its success. In other news, React 18 is now a release candidate. Its big new feature is concurrent rendering, which opens up new UI design patterns with suspense. Also, Apple just released a new desktop computer called the Mac Studio with a ridiculous 20 core m 1 ultra chip and an even more ridiculous, $4,000 price tag. Don't worry though, that'll look cheap pretty soon because inflation just set a new 4 year high today. Not to worry though, your friends over at the Federal Reserve are coming out this strong with a quarter percentage rate hike maybe at some point in the future. This has been the Code Report. Thanks for watching, and I will see you in the next one.
In this video, Speaker 0 discusses TypeScript, a program that would make it easier to build TypeScript code for vanilla JavaScript. He explains that a proposal would involve four stages before implemented into the Workflow standard, but many proposals fail. He also mentions a release candidate for React 18, including a new desktop computer and a rate hike from the Federal Reserve.