Find unused files, dependencies and exports in JavaScript and TypeScript projects
Find unused files, dependencies and exports in JavaScript and TypeScript projects
September 7, 2023 Open source hooliganism and the TypeScript meltdown I've seen a lot of true believers argue for virtues of their favorite paradigms and methods over the decades working in software. And mostly, I look at people with a passionate preference and smile. Isn't it great that people care so much about their craft that they volunteer to extol the benefits of their favorite tools! Yes it
2023 年度ã®åã®ã¨ã©ã¼ãã³ããªã³ã° ã«ã¤ãã¦æ¸ãããã æ¨æ¥Safe Data Fetching in Modern JavaScriptãèªãã§ãã¦ãfetch ã«éã£ã話ã§ã¯ãªããä¸å®¶è¨ããå 容ã ã£ãã®ã§æ¸ããããªã£ãã ããããããããã ã¨ãéå¹çã¨è¨ãããç¹ã¯ããã¨æãã®ã§ãã¿ããªã®ä¸å®¶è¨ãæãã¦æ¬²ããã 対象㯠Typescript ã§ã® ãµã¼ãã¼éçºæ³å®ã ããTS ã§ããã°ã¯ã©ã¤ã¢ã³ãéçºã«ãã»ã¨ãã©ã«å½ã¦ã¯ã¾ã話ã ã¨æãã ä¾å¤ã®ã¹ãã¼ã§ã¯ãªã Result åã使ã Result ã¯å¤±æãããããããªãã¨ããæèãä¸ãã¦ãããå ã¨ã©ã¼ãã³ããªã³ã°ã®æ¦ç¥ã¨ãã¦ä¾å¤ãæããã®ã§ã¯ãªããResult åãè¿ãããæ¹ãããã Result åã¨ããã®ã¯ export type Result<T, E> = Ok<T> | Err<E>; export interface Ok
JavaScript ã§é »åºãã undefined 㨠null ã«ã¤ãã¦èªãã¾ãã è¨èªä»æ§ä¸ã®éã JavaScript (ECMAScript) ã«ããã¦ãä»æ§ä¸ undefined 㨠null ã¯å½ç¶ãªããæ確ã«åºå¥ããã¦ãã¾ããããã¤ãè¨èªä»æ§ä¸ã®æ±ãã«ã¤ãã¦æãã¦ã¿ã¾ãã æ¯è¼ å³å¯ãªæ¯è¼æ¼ç®å === ã«ãã㦠undefined 㨠null ã¯åºå¥ããã¾ãããããæ¯è¼æ¼ç®å == ã«ããã¦ã¯ä¸¡è ã¯åºå¥ããã¾ããï¼ä»æ§ 7.2.14ï¼ã console.log(undefined === null); // false console.log(undefined == null); // true
vite4ããªãªã¼ã¹ããã¾ããããããã¸ã§ã¯ãä½ææã«ãvite@latestããæå®ãã¦ããããåé¡ããã¾ããã vite4ã¯ã以ä¸ãåç §ãã¦ãã ããã https://vitejs.dev/blog/announcing-vite4.html ã¯ããã« Reactã®éçºç°å¢ã¯ãCRA(Create React APP)ããã使ããã¾ãããCRAã¯æ²¢å±±ã®ã¢ã¸ã¥ã¼ã«ã®æ´åæ§ã®ç¢ºèªãªã©ã®ãããã¢ãããã¼ãããªãªã¼ã¹ãããã¾ã§ã®ééãçµæ§ããã¾ãã ã¾ãã使ããã¦ããã¢ã¸ã¥ã¼ã«ãã¢ãããã¼ãããã¨ã¨ã©ã¼ã«æ©ã¾ãããããã¾ãã ã¼ãããReactã®éçºç°å¢ãä½æãã¦ããã®ã§ãããããããã¨ãã©ã¤ãç¹°ãè¿ããã¡ã«ä»¥ä¸ã®æ¹æ³ã«è½ã¡çãã¾ããã æ¯è¼ççæéã§ç°å¢ãä½æã§ãã¾ãããå ¨ã¦ææ°ã®ã¢ã¸ã¥ã¼ã«ã使ãã¾ãã Vite nodejsãç¨ããJavaSriptããã¸ã§ã¯ãã¯ããWebpackãªã©ã§ã
JavaScriptã§ã«ã¹ã¿ã ä¾å¤ã¯ã©ã¹ãä½ããããªã¨æã£ããã ããã©ãã ã£ãã®ã§ããã®æ調ã¹ãã¨ãã®åå¿é²ã 以ä¸ããããåèã«ãªã£ã(´Ïï½) ã»ä¾å¤å¦ç â ä»äºã§ããã«ä½¿ããTypeScript ããã¥ã¡ã³ã ã«ã¹ã¿ã ä¾å¤ ãããªæãã export class CustomError extends Error { constructor(e?: string) { super(e); this.name = new.target.name; // Maintains proper stack trace for where our error was thrown (only available on V8) if (Error.captureStackTrace) { Error.captureStackTrace(this, this.constructor); } //
ã¯ããã« èªåã¯2021å¹´ã«æ°åã§webç³»ã®éçºä¼ç¤¾ã«ããã³ãã¨ã³ã¸ãã¢ã¨ãã¦å ¥ç¤¾ã2022å¹´ã§2å¹´ç®ã«ãªãã¾ãã å®åã§ã¯ReactÃTypeScriptãå©ç¨ããããã³ãå¨ãã®éçºãã¡ã¤ã³ã§è¡ãªã£ã¦ããªãã ä»åã¯å®åã§Next.jsããã¸ã§ã¯ãã«ãã¹ããå°å ¥ãããã¨ã«ãªããReact-Testing-Libraryãã¨ãJestãã«ã¤ãã¦æ¹ãã¦å¦ã³ç´ããã®ã§ãã®å 容ãç´¹ä»ãã¾ãã ã¯ããã«ãReact-Testing-Libraryãã¨ãJestãã®æ¦è¦ã説æããã®ä¸ã§å ·ä½çãªãã¹ãã³ã¼ããä½ãã¿ã¼ã³ãæ¸ãã¦ããã¾ãã ãã®è¨äºã®å¯¾è±¡è ããã³ãã¨ã³ãã®ãã¹ãã®æ¦è¦ãç¥ããã人 React-Testing-Libraryã¨Jestã«ã¤ãã¦ç¥ããã人 å ·ä½çãªãã¹ãã®æ¸ãæ¹ãå¦ã³ãã人 ãªãæ¬è¨äºã§ã¯ãReact-Testing-Libraryã®å ·ä½çãªæ¸ãæ¹ã«ã¤ãã¦ãã¡ã¤ã³ã«ãã¦ãã
JavaScriptã®ä»æ§ã§ããECMAScriptã¯Ecma Internationalã«ãã£ã¦å®ãããã¦ãã¾ããECMAScript 2015ï¼ES6ï¼ã®ç»å ´ä»¥éã¯ãECMAScript 2016ãECMAScript 2017・・・ã¨ã年次ã§ä»æ§ãæ´æ°ããã¦ãã¾ããECMAScript 2022ï¼ES2022ï¼ã¯2022å¹´6æ22æ¥ã®Ecma Internationalã®GA 123rd meetingã«ã¦ãECMAScript 2023ï¼ES2023ï¼ã¯2023å¹´6æ27æ¥ã®GA 125th meetingã§æ¿èªããã¾ããã ES2022ã¨ES2023ã¯ãã§ã«å¤ãã®ãã©ã¦ã¶ãNode.jsç°å¢ã§å©ç¨å¯è½ã§ããæ¬è¨äºã§ã¯æ°ä»æ§ã¨ä½¿ãã©ãããç´¹ä»ãã¾ãã ES2023 - é åã®éç ´å£æä½ ES2023ã§ã¯é åãéç ´å£ã§æä½ã§ããã¡ã½ããã追å ããã¦ãã¾ããéç ´å£ã¨ã¯ãå ã®é åãå¤æ´ã
As crappy as 2020 was, JavaScript as a whole still managed to somehow move forward. As the language itself keeps improving thanks to new features like Optional Chaining and Nullish Coalescing, TypeScript's widespread adoption is taking things to a whole other level by popularizing static typing. And on the framework side, just when we thought things were settling down, Svelte comes in and shakes e
å¤ãã®ãã¨ããã£ã2021å¹´ã§ãããæ¬å½ã«ããã®ã¢ã³ã±ã¼ãã ã£ã¦2022å¹´ã«å»¶ã³ã¦ãã¾ã£ããã§ãããï¼ ããé«éãªãã«ããã¼ã«ãæ°ããããã¯ã¨ã³ããã¬ã¼ã ã¯ã¼ã¯ãªã©ãJavaScriptã¯é²åãç¶ãã¦ãã¾ããç§ãã¡ããã¹ããå°½ãããæ°ãã質åå½¢å¼ãã2ã¤ã®ãã¼ã¿ãã¤ã³ãã®ç¸äºåç §æ©è½ï¼å¹´åÃçµé¨ã¬ãã«ãªã©ï¼ãããã¦ãã£ã¼ãã®ã«ã¹ã¿ãã¤ãºæ©è½ã¨ããã®ã¢ã³ã±ã¼ãã«ãã¯ã¼ã¢ãããæ½ãã¾ããï¼ã»ãã«ãããã®ã§ã[æ°æ©è½ã®ã¾ã¨ã]](https://dev.to/sachagreif/whats-new-in-the-2021-state-of-javascript-survey-4eej)ãèªãã§ã¿ã¦ãã ããï¼è±èªï¼ã ãã¹ã¦ãé 風æºå¸ã§ã¯ããã¾ããã§ãããæªããã¨ãèµ·ãã£ã¦ãªããããªã®ã幸ãã§ããããã¼ã¿æ¼æ´©ã«å¯¾å¿ããªãã¨ããã¾ããã§ãããã¾ãå¼ãç¶ãããã®ã¢ã³ã±ã¼ããããå æ¬çã«ãã¢ã¯ã»ã·ãã«
Leonardo Maldonado Follow Fullstack developer. JavaScript, React, TypeScript, GraphQL. The idea of having static type-checking in JavaScript is really fantastic and the adoption of TypeScript is growing more every day. You started to use TypeScript in your project, you created your first type, then you jumped to your first interface, and you got it working. You concluded that TypeScript, in fact,
å§ã TSãåãã¦åå¼·ããã¨ãã«ãtypeããinterfaceã使ãããã«ï¼ãã¨ããããã°ãããè¦ã¾ããããæ¥åã®æã¯å ¨é¨typeã§åãå®ç¾©ãã¦ã¾ãããããï¼ã¨ç念ã«æã£ã¦ã¾ããã®ã§ãè¨äºã§ã話ããã¦ããã ãã¾ãã 1. åã®å®ç¾© TSã§ä¸çªæã£åãæ©ãåãå®ç¾©ã§ããæ¹æ³ã¯å¤åããã ã¨æãã¾ãã let level: number = 15; level = 15 level = "åäº" //Type 'string' is not assignable to type 'number' ãã®ããã«å®£è¨æã®å¤æ°ã«æ¹ã®æ³¨éãã¤ãããã¨ãåã¢ããã¼ã·ã§ã³(Type Annotation)ã¨è¨ãã¾ããä¸ã®ä¾ã ãè¦ããç¹ã«åé¡ãªãããã«è¦ãã¾ãããã³ã¼ããå°ãã§ãè¤éã«ãªã£ããåé¡ãããã¾ãã
ããè¯ãReactéçºè ã«ãªããããåªããã³ã¼ããæ¸ããã³ã¼ãã£ã³ã°é¢æ¥ã§æãåºããããReactã®æéãæ¹åããããã«ä½¿ããç¥èã§ãã ãããçãããå§ãã¾ãããã 1. Reactããã¯ã使ã£ãé¢æ°ã³ã³ãã¼ãã³ã ããã¯ã¯React v16.8ã§å°å ¥ãããReactã®é¢æ°åããã°ã©ãã³ã°ã大ããåä¸ããã¾ãããReactããã¯ã§ãã¯ã©ã¹ã³ã³ãã¼ãã³ãã®ä»£ããã«é¢æ°ã³ã³ãã¼ãã³ãã使ãã¾ããã使ãã¹ãã§ããããã...é¢æ°ã³ã³ãã¼ãã³ãã¨ã¹ãã¼ãã¨ã¯ï¼ã©ã¤ããµã¤ã¯ã«ã¡ã½ããã¨ã¯ï¼ æããå¿ è¦ã¯ããã¾ãããReactããã¯ã使ãã°ã§ãã¾ãã ä¾ãããã¤ãè¦ã¦ã¿ã¾ãããã ããã¯ãã¯ã©ã¹ã使ãå¾æ¥ã®æ¹æ³ã§ãã次ã®ããã«useStateããã¯ã使ãã¾ãã ç°¡åã«è¦ãã¾ããï¼ãã®éãã§ãï¼useStateããã¯ã使ã£ã¦ãåæç¶æ ã空ã®æååï¼''ï¼ã«è¨å®ããç¾å¨ã®ç¶æ ï¼valueï¼ã¨ãã®ç¶æ ãå¤
2021å¹´ã«ãªã£ã¦JavaScriptãTypeScriptãNode.jsã®åå¼·ãå§ãã¾ããã ãã®è¨äºã§ã¯ãèªãã§è¯ãã£ãæ¬ãè¨äºãå ¬å¼ããã¥ã¡ã³ããªã©ãã¾ã¨ãã¦ããã¾ãã â»2021/03æç¹ã®æ å ±ã§ãã å人çãªãªã³ã¯éã§ãããããããèªãã¨è¯ãããã¨ãããã®ãããã°ãã²æãã¦ãã ããã ECMAScript ECMAScriptã®ä»æ§ã¯ãEcmaã®TC39ã§çå®ããã¦ãã Ecma TC39 GitHub organization ep78 TC39 | mozaic.fm Node.jsã®åãã¼ã¸ã§ã³ã§ã®ECMAScriptãµãã¼ãç¶æ³ JavaScript Misreading Chat - #86: JavaScript: the first 20 years JavaScript äºåå¹´ã®æ´å²ã«ã¤ãã¦ã®å JavaScript ãã¥ã¼ããªã¢ã« | MDN JavaScri
// Good: choose between two options as appropriate (see below). import * as ng from '@angular/core'; import {Foo} from './foo'; // Only when needed: default imports. import Button from 'Button'; // Sometimes needed to import libraries for their side effects: import 'jasmine'; import '@polymer/paper-button'; Import paths TypeScript code must use paths to import other TypeScript code. Paths may be r
The New TypeScript Handbook has some real gems in it. Here's what it has to say about generics: Writing generic functions is fun, and it can be easy to get carried away with type parameters. Having too many type parameters or using constraints where they aren't needed can make inference less successful, frustrating callers of your function. It goes on to offer a few specific pieces of advice about
Published on July 28, 2020 Stefan on Mastodon Reading time: 10 minutes More on TypeScript, React, Preact This list is a collection of component patterns for React when working with TypeScript. See them as an extension to the TypeScript + React Guide that deals with overall concepts and types. This list has been heavily inspired by chantasticâs original React patterns list. Contrary to chantasticâs
Deno ver 1.0 5æ13æ¥ãDeno v1.0ã®æ£å¼ãªãªã¼ã¹ã決å®ãã¾ããã å°ãåå¼·ãã¦ã¿ã¾ãããã â ãããã Denoã£ã¦ãªã«ï¼ Denoã¯Node.jsã®è£½ä½è ã§ããRyan Dahlã«ãã£ã¦ä½ããã¾ãããæ°ããJS/TSã©ã³ã¿ã¤ã ã§ã Denoã¯defaultã§å®å ¨ã§ãï¼è¨±å¯ãªãã§ã¯ãã¡ã¤ã«ã»ãããã¯ã¼ã¯ã»ç°å¢ã«ã¢ã¯ã»ã¹ã§ãã¾ããï¼ Denoã¯TypeScriptããã«ãã¤ã³ã§å ¥ã£ã¦ã¾ã å¤é¨ããã±ã¼ã¸ã¯urlã§ã¤ã³ãã¼ãã§ãã¾ãï¼Goã¿ããã«ï¼ ãã£ã¼ãã£ã¦èªããããï¼ããã§ã¯ãªãï¼ Denoãä½ãããèæ¯ ä¸å¹´åãããã«ãã®åç»ãè¦ããã¨ãæãåºãã¾ããã Node.jsã®ä½è ã§ããRyan DahlããNode.jsãéçºããå½æã®ä»æ§ãå¾æããæ¨ã®åç»ã§ãã https://www.youtube.com/watch?v=M3BM9TB-8yA&t=1319s
Deno is the open-source JavaScript runtime for the modern web. Built on web standards with zero-config TypeScript, unmatched security, and a complete built-in toolchain.
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}