並び順

ブックマーク数

期間指定

  • から
  • まで

281 - 320 件 / 497件

新着順 人気順

TypeScriptの検索結果281 - 320 件 / 497件

  • Effective TypeScript › Flow Nodes: How Type Inference Is Implemented

    In most programming languages a variable has a type and that type does not change. But one of the most interesting aspects of TypeScript's type system is that a symbol has a type at a location. Various control flow constructs can change this type: function refine(x: string | number) { // type of x is string | number here if (typeof x === 'number') { // type of x is number here. } else { // type of

      Effective TypeScript › Flow Nodes: How Type Inference Is Implemented
    • ESLint を使って JSDoc / TSDoc の記述を必須化する

      これはなに コードベースに対し JSDoc の記述を必須化するための ESLint 設定手順をまとめたものです。 JSDoc を始めとする Doc コメントはコードに最も近いドキュメントであり、これがあるのと無いのとではコードベースの保守性に天と地ほどの差が生まれます。そんな JSDoc ですが、OSS ならともかく(内製・受託を問わず)商業ソフトウェア開発の現場では軽視されがちです。後からコーディング規約を定めたところで開発メンバーにドキュメントを書く習慣が備わっていなければ書き漏れが頻発するのが関の山です。 コードレビューで都度指摘するにはあまりにコストがかかるため、ESLint に委ねるのが望ましいです。 前提 フレームワークは React(or Next.js)を使っている。 TypeScript を主体としている。 ビルドスクリプトや設定ファイルは JavaScript も併用し

        ESLint を使って JSDoc / TSDoc の記述を必須化する
      • GitHub - ysk8hori/delta-typescript-graph-action: This GitHub Action uses Mermaid to visualize in a diagram the files that were changed in a Pull Request and their related dependency files.

        You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

          GitHub - ysk8hori/delta-typescript-graph-action: This GitHub Action uses Mermaid to visualize in a diagram the files that were changed in a Pull Request and their related dependency files.
        • Thinking in React Query

          Thinking in React Query07.06.2023 — ReactJs, React Query, TypeScript, JavaScript — 1 min read #1: Practical React Query#2: React Query Data Transformations#3: React Query Render Optimizations#4: Status Checks in React Query#5: Testing React Query#6: React Query and TypeScript#7: Using WebSockets with React Query#8: Effective React Query Keys#8a: Leveraging the Query Function Context#9: Placeholder

            Thinking in React Query
          • Cloudflare Workersとかでお仕事したり遊んだりしていたら就職することになった件|ryoppippi

            ことの顛末5月: Cloudflareで開発を始める/遊び始める2023年5月ごろからとある業務委託で新規開発を任されたので、心機一転新しいスタックで開発を行っていました。 具体的には Cloudflare Workers/Pages (Host) SvelteKit(フロントエンド) Hono (API Backend) Lucia Auth (認証) Drizzle (ORM) Swift UI (モバイル) Planetscale (DB) etc... なるべく安く、なるべく安定させて、かつWeb FrontendもiOSアプリも必要だったのでこのような構成になってます。 当時、この構成でこれだけのものを一人で開発していました。文字通りのfull stack engineerをやってました。とてもしんどかったですが、最近のエコシステムの成熟はとてつもなく、1ヶ月ほどで基本のものは出

              Cloudflare Workersとかでお仕事したり遊んだりしていたら就職することになった件|ryoppippi
            • GitHub - microsoft/TypeChat: TypeChat is a library that makes it easy to build natural language interfaces using types.

              TypeChat is a library that makes it easy to build natural language interfaces using types. Building natural language interfaces has traditionally been difficult. These apps often relied on complex decision trees to determine intent and collect the required inputs to take action. Large language models (LLMs) have made this easier by enabling us to take natural language input from a user and match t

                GitHub - microsoft/TypeChat: TypeChat is a library that makes it easy to build natural language interfaces using types.
              • GitHub - azat-io/eslint-plugin-perfectionist: 🦄 ESLint plugin for sorting various data such as objects, imports, types, enums, JSX props, etc.

                You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                  GitHub - azat-io/eslint-plugin-perfectionist: 🦄 ESLint plugin for sorting various data such as objects, imports, types, enums, JSX props, etc.
                • TypeScript performance made easy

                  A suite of open-source tools that help you visualise potential performance issues, detect regressions, decode compiler measurements and much more.

                    TypeScript performance made easy
                  • Svelte テンプレートから React コンポーネント を生成するコンパイラを書いた (PoC)

                    欲しい物がなければ、自分で作るしかないシリーズ なぜ作ったか .svelte のテンプレートは .tsx と違って JS/TS としてのプログラミング言語としての構文の影響下になく、プログラムをあまり書かないマークアップエンジニアとの連携に便利で気に入っています(リスト表示に .map で目を回すぐらいの人を想定しています)。シンプルな構文で TypeScript の型もつきやすく、IDE支援もそこそこで、 モダンな vue テンプレートという感じです。 しかしながら、 GitHub のオープンソースのトレンドを見ればわかるように、フロントエンドのエコシステムは基本的に jsx/tsx を中心に回っています。そして現代の View 層のライブラリは(WebComponents がライブラリ間のブリッジとして失敗しているので)同じライブラリ同士でしか接続できず、この現状に不満を持っていました

                      Svelte テンプレートから React コンポーネント を生成するコンパイラを書いた (PoC)
                    • ZodでJSONのオブジェクトを実行時に都合の良い型に変換する | フューチャー技術ブログ

                      いろんなJavaScriptの統計を見ると、今時のウェブフロントエンドの新規開発は80%はTypeScriptになっているということです。また、TypeScript自身を使わなくても、TypeScriptで培われた型推論のパワーで、JavaScriptであってもVSCode上で補完とか思いの外うまくいったりしちゃうので、TypeScriptフレンドリーというのはますます重要になっています。 ですが、TypeScriptが有効なのはコンパイル前とか実装中であり、実行時に流れてくるJSONが果たしてきちんとした型通りの定義なのかはTypeScriptの範疇外です。そこでZodとかのバリデーションを行ってくれるライブラリが使われます。Zodを使えばJSONが規定通りの構造をしているか確認した上で、TypeScriptの型を持った変数に安全に代入してくれます。 ですが、JSONというのはネットワー

                        ZodでJSONのオブジェクトを実行時に都合の良い型に変換する | フューチャー技術ブログ
                      • AWS Lambda FunctionをScala.jsで書いて爆速Scalaを満喫しよう - Lambdaカクテル

                        この記事は、Scala Advent Calendar 2023の5日目の記事です。 qiita.com 大遅刻してしまいましたが、Scalaは遅延評価できるのでモーマンタイですね。 この記事では、Scalaをクラウドネイティブな環境で使う例の紹介として、ScalaをJavaScriptコードにトランスパイルしてAWS Lambdaで動作させる方法を紹介します。 愉快な遠足の始まりだ!!! Scalaプラットフォームの発展 Scalaはクラウドネイティブ時代に乗り遅れている?(いえいえ) 想定環境 Scala.jsで快適にLambda関数を書いてみよう 最低限のScala.jsを実装する 設定 トランスパイル Scala.jsコードをLambda関数の呼び出し規約に合わせる 規約を実装する Lambda関数を作成する イベントなどの入力 ここまでのまとめ Scala.jsでライブラリを利用

                          AWS Lambda FunctionをScala.jsで書いて爆速Scalaを満喫しよう - Lambdaカクテル
                        • 【Vue】reactive()って要らなくね?ref()だけでよくね? - Qiita

                          使用技術 Vue3 + Nuxt3 Composition API TypeScript ワイ、お問い合わせフォームを作りたい ワイ「Vue の Composition API を使って、お問い合わせフォームを作るで!」 ワイ「フォームのデザインはこんな感じや!」 ワイ「いや〜、我ながらイケてるデザインやな!」 ワイ「ほな、Composition APIを使ってフォームの状態を管理していくで〜」 フォームの状態を管理するには? ref()またはreactive() ワイ「Composition APIの場合、状態を管理するには」 ワイ「ref()またはreactive()を使うんやったな」 ワイ「この2つは何が違うんやろ?」 ワイ「確か───」 ref() 文字列・数値・真偽値などの、プリミティブな値を保持できる reactive() オブジェクト・配列・Map・Setなどの状態を保持でき

                            【Vue】reactive()って要らなくね?ref()だけでよくね? - Qiita
                          • Announcing TypeScript 5.2 RC - TypeScript

                            Today we’re excited to announce our Release Candidate of TypeScript 5.2! Between now and the stable release of TypeScript 5.2, we expect no further changes apart from critical bug fixes. To get started using the RC, you can get it through NuGet, or through npm with the following command: npm install -D typescript@rc Here’s a quick list of what’s new in TypeScript 5.2! using Declarations and Explic

                              Announcing TypeScript 5.2 RC - TypeScript
                            • Astro DBでTODOリストを作成

                              AstroからデータベースプラットフォームとしてAstro DBがリリースされました。 色々と触ってみたのでチュートリアルとしてTODOリストを作成する方法を解説します。 Astroのインストール まずは通常のAstroのインストールを行います。 npm create astro@latestでproject名を「astro-todo」、Emptyプロジェクトを選択して作成します。 % npm create astro@latest astro Launch sequence initiated. dir Where should we create your new project? ./astro-todo tmpl How would you like to start your new project? Empty ts Do you plan to write TypeScrip

                                Astro DBでTODOリストを作成
                              • Storybook 7.1

                                Storybook is the industry standard workshop for UI component development, documentation, and testing. It’s used by teams at Twitter, GitHub, the BBC, and the New York Times. After launching Storybook 7.0 back in April, we plan to ship future releases that are both more frequent and smaller in size. That will help Storybook keep in sync with changes across the frontend ecosystem while smoothing the

                                  Storybook 7.1
                                • Object.fromEntriesを活用してArray#reduceを代替する

                                  JavaScriptにおいて、ある配列をもとにして別のオブジェクトを作成する場合、Array#reduceを使用することが多い。 const input = ['foo', 'bar', 'baz']; const result = input.reduce((accumulator, currentValue) => { accumulator[currentValue] = capitalize(currentValue); return accumulator; }, {}); assert.deepStrictEqual(result, { foo: 'Foo', bar: 'Bar', baz: 'Baz' }); しかし例のように、単にキーと値の組み合わせにマッピングするだけなら、あえてArray#reduceを使うまでもない。代わりにObject.fromEntriesを使え

                                    Object.fromEntriesを活用してArray#reduceを代替する
                                  • Deno 1.38: HTML doc generator and HMR

                                    The Deno ecosystem continues to mature, and with the 1.38 release, we’re excited to introduce significant improvements to the deno doc command. Topping the list is the ability to produce static site documentation using the new deno doc --html feature, a game-changer for developers looking to share and publish their project documentation. If you already have Deno installed, upgrade to version 1.38

                                      Deno 1.38: HTML doc generator and HMR
                                    • Compiling a standalone executable using modern JavaScript/TypeScript runtimes

                                      You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                        Compiling a standalone executable using modern JavaScript/TypeScript runtimes
                                      • TypeScript5.2 で追加された using Declarations and Explicit Resource Management をテストで活用する - ドワンゴ教育サービス開発者ブログ

                                        こんにちは。N予備校 Webフロントエンド開発チームの堀です。 先日 TypeScript@5.2 が正式リリースされました。 TypeScript@5.2 で新しく追加された using Declarations and Explicit Resource Management (using 構文と明示的リソース管理)によって、N予備校のフロントエンドのテストでの本質的でない処理をカプセル化し、コード上のノイズを削減することができました。 この記事では、using 構文の活用方法や利用するまでの手順、調査した using 構文の挙動について紹介します。 N予備校のPCブラウザ向けフロントエンドの紹介 N予備校のPCブラウザ向けUIのテストについて テストの種類 UIコンポーネントの単体テストについて リクエスト内容のテスト 課題: 本質的でない処理が afterEach に漏れ出ている

                                          TypeScript5.2 で追加された using Declarations and Explicit Resource Management をテストで活用する - ドワンゴ教育サービス開発者ブログ
                                        • GitHub - google/tsec

                                          You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                            GitHub - google/tsec
                                          • GitHub - openai/openai-node: The official Node.js / Typescript library for the OpenAI API

                                            You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                              GitHub - openai/openai-node: The official Node.js / Typescript library for the OpenAI API
                                            • TSKaigiのスポンサーです、リフレッシュメントについて全てをお話します - エムスリーテックブログ

                                              はじめに TSKaigi本番も迫り緊急でテックブログを書いています、VPoEの河合です。 来る5月11日(土)、TSKaigi 2024が開催されます。エムスリーエンジニアリンググループは、TSKaigiをリフレッシュメントスポンサーとして応援しています。 本記事は、少しばかりTSKaigiの宣伝をしつつ、エムスリーのJavaScript/TypeScript文化のお話をするものです。 はじめに TSKaigiとは エムスリーにおけるTypeScript 学生向けLTも開催 おわりに We are hiring !! TSKaigiとは TSKaigiは、一般社団法人TSKaigi Associationが企画、運営する、国内最大級のTypeScriptをテーマにした技術カンファレンスです。 今年が第1回目とのことですが、KeynoteにはTypeScript Product Manage

                                                TSKaigiのスポンサーです、リフレッシュメントについて全てをお話します - エムスリーテックブログ
                                              • GitHub - aerotoad/neboa: Type-safe NoSQL with Node & SQLite. 🌫️💽

                                                Neboa (pronounced /ˈnɛβo̯a̝/, from Galician: «fog») is a simple, yet powerful, type-safe NoSQL database library for Node.js. It offers seamless data management with compile-time type-checking for enhanced reliability. Leveraging SQLite, Neboa ensures efficient and lightweight performance, making it perfect for Electron and other platforms. With its unique approach, Neboa empowers you to use a rela

                                                  GitHub - aerotoad/neboa: Type-safe NoSQL with Node & SQLite. 🌫️💽
                                                • DeviceScript | DeviceScript

                                                  Experimental Project from Microsoft Research - Join the discussions to provide feedback.

                                                  • Flappy Bird Implemented in Typescript types

                                                    10/19/2023 Flappy Bird Implemented in Typescript types The ultimate type-level trickery I wrote a 2D flappy bird game, purely in Typescript types: Yes you heard that right, this game is written entirely in Typescript type annotations, which—if you didn’t know—are Turing complete. So how the hell am I runnning it in the browser and rendering the game in Typescript types? The basic rundown is that I

                                                    • Real World Type Puzzle and Code Generation

                                                      TSKaigi 2024 https://tskaigi.org/

                                                        Real World Type Puzzle and Code Generation
                                                      • TypeScript 5.2's New Keyword: 'using'

                                                        Matt PocockMatt is a well-regarded TypeScript expert known for his ability to demystify complex TypeScript concepts. TypeScript 5.2 introduces a new keyword - using - that you can use to dispose of anything with a Symbol.dispose function when it leaves scope. { const getResource = () => { return { [Symbol.dispose]: () => { console.log('Hooray!') } } } using resource = getResource(); } // 'Hooray!'

                                                          TypeScript 5.2's New Keyword: 'using'
                                                        • ビルド用の tsconfig を用意するよりもバンドラに任せた方が楽かもしれない - Object.create(null)

                                                          TypeScript でライブラリ (npm パッケージ) を作るときに, ビルド用の tsconfig を用意することがあります. 例えば以下のような tsconfig.json を作成したとしましょう. { "compilerOptions": { "rootDir": "src", "outDir": "lib", "target": "esnext", "module": "esnext", "moduleResolution": "bundler", "esModuleInterop": true, "strict": true, "sourceMap": true, "declaration": true }, "include": [ "src/**/*" ] } これを使って素朴に tsc -p tsconfig.json のようにビルドすると, src/index.ts

                                                            ビルド用の tsconfig を用意するよりもバンドラに任せた方が楽かもしれない - Object.create(null)
                                                          • Announcing TypeScript 5.4 - TypeScript

                                                            Today we’re excited to announce the release of TypeScript 5.4! If you’re not familiar with TypeScript, it’s a language that builds on top of JavaScript by making it possible to declare and describe types. Writing types in our code allows us to explain intent and have other tools check our code to catch mistakes like typos, issues with null and undefined, and more. Types also power TypeScript’s edi

                                                              Announcing TypeScript 5.4 - TypeScript
                                                            • nvim-dap-vscode-jsを導入してjs,tsファイルをデバッグする

                                                              最近お仕事柄TypeScriptを触ることが増えてきました。LSPが整っているのでコードの定義の確認やコードジャンプなどは困っていなかったのですが、イイ感じにデバッグする環境が整っていないことに気づきました。 調べたところnvim-dap-vscode-js という素敵なプラグインを見つけたので、設定の流れをまとめておきます。 導入 READMEに沿ってインストールを進めます。私の環境では lazy.nvimを利用しているので、書き方を変えています。この辺りはお使いのパッケージマネージャーの書き方で読み替えてください。 { "mfussenegger/nvim-dap", dependencies = { "rcarriga/nvim-dap-ui", "theHamsta/nvim-dap-virtual-text", "mxsdev/nvim-dap-vscode-js", { "mi

                                                                nvim-dap-vscode-jsを導入してjs,tsファイルをデバッグする
                                                              • 2024年以降でも Android で WebView ベースのアプリを作るあなたへ

                                                                こんにちは!アルダグラムでエンジニアをしている渡邊です! 本記事は株式会社アルダグラム Advent Calendar 2023 1日目の記事です。 早いもので2023年もあと一ヶ月となり、2024年もまもなくです。最近モバイルアプリのクロスプラットフォーム開発では Flutter や Kotlin Multiplatform などをよく見かけます。 しかしクロスプラットフォーム開発といえば... そう WebView を使った方法があります。 これは WebView で HTML を表示させることで Android や iOS などで共通に画面を作成する方法で、モバイルアプリ開発の初期からあった方法です。 プロジェクトの構成や工数、実装難易度によって WebView を使った開発を採用することもあると思いますが、個人的な意見としてそれは選択肢としてアリかと思っています。 最近アプリチーム

                                                                  2024年以降でも Android で WebView ベースのアプリを作るあなたへ
                                                                • Advanced TypeScript Techniques for Senior React Developers

                                                                  As a Senior React Developer, you’re always looking for ways to improve your skills and write better code. One technology that can help you achieve this is TypeScript. TypeScript is a statically typed language that is a superset of JavaScript. It provides developers with advanced features such as type checking, interfaces, and generics, which can help catch errors early on and improve the…

                                                                    Advanced TypeScript Techniques for Senior React Developers
                                                                  • Infer type predicates from function bodies using control flow analysis by danvk · Pull Request #57465 · microsoft/TypeScript

                                                                    You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                      Infer type predicates from function bodies using control flow analysis by danvk · Pull Request #57465 · microsoft/TypeScript
                                                                    • TypeScript is Surprisingly OK for Compilers

                                                                      TypeScript is Surprisingly OK for Compilers Aug 17, 2023 There are two main historical trends when choosing an implementation language for something compiler-shaped. For more language-centric tasks, like a formal specification, or a toy hobby language, OCaml makes most sense. See, for example, plzoo or WebAssembly reference interpreter. For something implementation-centric and production ready, C+

                                                                      • サービス開発におけるVue3とTypeScriptの親和性について

                                                                        2024年5月11日(土)に開催された TSKaigi 2024 のセッションで発表したスライドになります。 Vue3がリリースされ、早くも4年弱経とうとしています、Vue2のLTSも2023年末に終了し、新規開発ではVue3を利用することが主流となってきました。 Vueと並ぶフレームワークとしてReactがありますが、未だにReactと比較される際、TypeScript対応が…という噂がたまに聞こえてきます。しかして、Vue3とTypeScriptの親和性は実際のところどうなのでしょうか。Piniaやその他ツールチェイン側などと共にVue3の機能や実際の実装例とともにVue3とTypeScriptの親和性の疑問を解消できるような発表にできればと思っています。 https://tskaigi.org/talks/karan_corons

                                                                          サービス開発におけるVue3とTypeScriptの親和性について
                                                                        • graphql-codegen Client Preset 時代(v3~)の おすすめ設定 for TypeScript

                                                                          7月はLayerX エンジニアブログを活発にする期間です。今日は誰がなんと言おうと 7/6 です。 昨日 7/5 は「Datadog のコスト最適化で月額費用を 30% 削減した」でした。 2022年10月3日に、GraphQL Code Generator(以下、graphql-codegen)のおすすめ設定に関する記事を公開しました。 しかし、その後、graphql-codegen v3のリリースに伴い、ReactやVueではclient-presetが推奨されるようになりました。 client-preset前提の環境では、利用可能な設定項目などがいくつか変わるため、本記事では改めて、graphql-codegen以降のClient preset時代のおすすめ設定をまとめています。 全体 設定を TypeScript で書く graphql-codegen v3から公式ドキュメントで案

                                                                            graphql-codegen Client Preset 時代(v3~)の おすすめ設定 for TypeScript
                                                                          • Finishing Turborepo's migration from Go to Rust – Vercel

                                                                            We've finished porting Turborepo, the high performance JavaScript and TypeScript build system, from Go to Rust. This lays the groundwork for better performance, improved stability, and powerful new features. Here’s how we finished this port and shipped the first all-Rust version of turbo. Since last timeAt the end of our previous article, we had completed the “Rust-Go-Rust sandwich”, or “Go sandwi

                                                                              Finishing Turborepo's migration from Go to Rust – Vercel
                                                                            • GitHub - 3rd/tsdiagram: Create diagrams and plan your code with TypeScript.

                                                                              You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                                GitHub - 3rd/tsdiagram: Create diagrams and plan your code with TypeScript.
                                                                              • Write OpenAPI with TypeSpec

                                                                                I've spent the last few years at Microsoft working on an API definition language called TypeSpec. It's essentially a super flexible protocol-agnostic DSL for describing API shapes. You can try it in your browser at the TypeSpec playground. Many things about it are exciting, but I want to talk about one thing in particular: why TypeSpec is the best way to write OpenAPI. OpenAPI: the good and the no

                                                                                • Bringing Modern JavaScript to the Jupyter Notebook

                                                                                  Visualizing Data via Deno, TypeScript, and VegaLite in JupyterLab Deno brings TypeScript, JavaScript, npm, and ES Modules to Jupyter with an easy to install kernel. The Deno Kernel is the first language runtime with a builtin jupyter kernel. There’s no better time to get started with Deno than now. Once deno is installed, run the deno jupyter kernel installation: deno jupyter --unstable --install

                                                                                    Bringing Modern JavaScript to the Jupyter Notebook