Skip to content

Instantly share code, notes, and snippets.

View chenglou's full-sized avatar
💫

Cheng Lou chenglou

💫
View GitHub Profile
@chenglou
chenglou / swizzle.ts
Created December 4, 2024 01:36
Swizzle file size
class Vec2 {
x: number
y: number
constructor(x: number, y: number) {
this.x = x
this.y = y
}
get xx() { return new Vec2(this.x, this.x) }
get xy() { return new Vec2(this.x, this.y) }
import typescriptEslint from "@typescript-eslint/eslint-plugin"
import tsParser from "@typescript-eslint/parser"
/** @type {import("@typescript-eslint/utils").TSESLint.FlatConfig.ConfigArray} */
export default [
{
ignores: [""],
},
{
languageOptions: {