match:光荣的开关

比赛美化开关,为打字稿创建某种模式匹配提供测试/值元组[, ] match数组,检查每个元组是否满足条件,并从第一个匹配的元组中返回值。要提供默认值,请指定[true, 'zero']作为最后一个元组。 import { match } from "https://raw.githubusercontent.com/danielr1996/match/main/match.ts" ; // Calculate Dynamic because otherwise typescript does static analysis and tells you that some conditions can never be met const v = ( 1 + 1 ) . toString ( ) console . log ( m
zip 文件大小:1.74KB