Skip to content

Instantly share code, notes, and snippets.

Avatar
🐕

Orta Therox orta

🐕
View GitHub Profile
@orta
orta / pong.lua
Created Apr 23, 2022
A trivial version of pong for the playdate
View pong.lua
import "CoreLibs/sprites"
import "CoreLibs/graphics"
playdate.display.setRefreshRate(20)
local gfx = playdate.graphics
local spritelib = gfx.sprite
local screenWidth = playdate.display.getWidth()
local screenHeight = playdate.display.getHeight()
@orta
orta / example.d.ts
Last active Dec 9, 2021
html-lang-tester
View example.d.ts
export type ABC = {
one: 123
}
@orta
orta / 0 ~ Intro.md
Last active Oct 29, 2021
Type | Treats 2020
View 0 ~ Intro.md

The Challenge

Welcome to TypeScript's first ever set of virtual code challenges: Type | Treat (or "Type or Treat")! We will be presenting some "spooky" code challenges that will allow you to get deeper into the TypeScript language but in a fun way.

Starting tomorrow, a new code challenge will be posted every weekday, along with its solution the day after. The last solution will be posted on Halloween day.

Are The Challenges For TypeScript Developers Only?

Absolutely not! We want all developers, familiar with TypeScript or not to be apart of Type | Treat. Every day will have two different types of challenges, one for beginners/learners and one for intermediate/advanced developers. That way everyone can participate.

@orta
orta / rfc.md
Last active Dec 11, 2021
A proposal for improving TS2322 error messages
View rfc.md

This is a work in progress. Please don't take this as something that will definitely happen, we all know what happens to well laid plans and I need to present it to the rest of the TypeScript team in order to figure out a lot of feasibility questions.

Intro

The examples in this PR assumes [CLI DX] Improve positioning of compiler error messaging info #45717 is merged

In 4.4, all diagnostic messages from TypeScript are treated the same, we have a massive .JSON file of ±2000 diagnostic messages which are used everywhere from compiler messages to CLI help. Aside from some simple string manipulation, these are effectively what we output for all error messages. I'd like to propose that we break this pattern, just for error TS2322.

TS2322 is our 'type x is not assignable to y' error, you'd see it for const str: string = 123 and I expect it is the most seen

@orta
orta / tsc-compiler-errors-3.svg
Last active Sep 6, 2021
Ideas for TSC with prettier pretty settings - click raw on this svg below
View tsc-compiler-errors-3.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist:dd0868bc8cd780f4ac81aaf30e7f8d34
[229,"collections"
[237,"json3"
[240,"intl"
[242,"ofe"
[245,"rickshaw"
[246,"webcrypto"
[249,"tsc-watch"
[253,"slackdown"
[256,"node-os-utils"
[256,"touch-events"
@orta
orta / upload.yml
Created Feb 5, 2021
Upload GitHub Action
View upload.yml
name: Upload infra
on:
push:
branches:
- main
- prod
jobs:
build-and-deploy:
@orta
orta / files.sh
Created Jan 26, 2021
Number of html files in the TypeScript website
View files.sh
❯ tree packages/typescriptlang-org/public -P "*.html"
packages/typescriptlang-org/public
├── Handbook
│   └── index.html
├── License.html
├── Playground
│   └── index.html
├── Tutorial
│   └── index.html
@orta
orta / snowpack-plugin-assets.js
Last active Dec 6, 2020
A simple snowpack plugin for generating a .d.ts file for paths inside an asset folder
View snowpack-plugin-assets.js
// @ts-check
const fs = require("fs")
const { join, basename } = require("path")
const { format } = require("prettier")
let log = undefined
/** @type {import("snowpack").SnowpackPluginFactory} */
function plugin(_snowpackConfig, _pluginOptions) {
@orta
orta / review.md
Created Nov 5, 2020
Orta's self review - late 2020
View review.md

Core Priorities

  1. Lower the barrier of entry to adopting and understanding TypeScript. North star.

  2. Understand the TypeScript Codebase enough to provide useful API documentation and fix bugs. Validated by having a more comprehensive set of tools for people to understand how the language and tooling works.

  3. Make contributing to TypeScript easier, and reduce the amount of work maintainers need to do. Validated probably by the number of open PRs, and the number of external contributors per release.

  4. Make it easier to people wanting to build tooling around TypeScript. Validated by seeing more usage of tools like the community discord, people shipping tools with TypeScript support by default etc.