Skip to content

Instantly share code, notes, and snippets.

View danialdezfouli's full-sized avatar
🐉
typescript.go

Danial Dezfouli danialdezfouli

🐉
typescript.go
View GitHub Profile
@rstacruz
rstacruz / README.md
Last active January 17, 2024 22:27
Setting up Babel and TypeScript

Install Babel 7 and TypeScript

yarn add --dev \
  @babel/core \
  @babel/cli \
  @babel/preset-env \
  @babel/preset-typescript \
  typescript
package main
import "fmt"
// fibonacci 函数会返回一个返回 int 的函数。
func fibonacci() func() int {
n0 := 0
n1 := 1
return func() int {
n2 := n0 + n1