並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 8 件 / 8件

新着順 人気順

typingsの検索結果1 - 8 件 / 8件

  • TypeScriptのdeclareやinterface Windowを勘で書くのをやめる2022

    おことわり 個々の関数や変数に正しい型をつける話はしません。TypeScript HandbookのDeclarationの章などを読むことをおすすめします。 かわりに、本稿では関数や変数の型宣言をどこにどう置くべきかの指針を与えます。 モジュールとスクリプト declareを正しく使うにはまずモジュールとスクリプトの区別を理解し、意識することが大切です。 ブラウザやNode.jsは外部からの指定でモジュールとスクリプトを区別しますが、TypeScriptでは原則としてファイルの内容でモジュールとスクリプトを区別します。 import 宣言または export 宣言が1つ以上あればモジュール。 CommonJSモジュールの場合はTypeScript専用構文である import = 宣言、 export = 宣言を使う。 それ以外の場合はスクリプト。 ただし、JavaScriptファイル (

      TypeScriptのdeclareやinterface Windowを勘で書くのをやめる2022
    • Template literal types and mapped type 'as' clauses by ahejlsberg · Pull Request #40336 · microsoft/TypeScript

      This PR implements two new features: Template literal types, which are a form of string literals with embedded generic placeholders that can be substituted with actual string literals through type instantiation, and Mapped type as clauses, which provide the ability to transform property names in mapped types. Template literal types Template literal types are the type space equivalent of template l

        Template literal types and mapped type 'as' clauses by ahejlsberg · Pull Request #40336 · microsoft/TypeScript
      • Reconstructing TypeScript, part 0: intro and background

        Jake Donham > Technical Difficulties > Reconstructing TypeScript, part 0 Reconstructing TypeScript, part 0: intro and background2021-09-07I've been building a "document development environment" called Programmable Matter that supports live code embedded in documents, with a simple TypeScript-like programming language. It's been fun figuring out how to implement it—the type system in TypeScript is

        • TypeScriptはgradual typingシステムか - Qiita

          概要 TypeScriptは,動的型付けシステムであるJavaScriptに静的型システムによる検査を部分的に導入できるプログラミング言語であり,gradual typing (漸進的型付け)システムであるとされることがあります.Siekらは,動的型付けと静的型付けの融合を図るシステム全般が無闇にgradual typingを名乗ることを疑問視して,gradual typingシステムが満たすべき基準を提案しました.本稿では,この基準に照らしてTypeScriptがgradual typingの条件を満たしていないことを指摘します.特に,ランタイムの型チェックを行わないというTypeScriptのデザインが,gradual typingの意味での健全性を明らかに阻害しています. 1 背景 ソフトウェア開発が大規模化する状況において,コード品質の担保や開発速度の維持は重要な課題です.静的型付

            TypeScriptはgradual typingシステムか - Qiita
          • Building a type checked url router from scratch

            2020-10-29 This applies to TypeScript 4.1 and later. The router, a central part in many web apps, is sometimes stringly typed. With inspiration from Dan Vanderkam's Twitter post, we'll examine how to build a url-based router where routes are type checked. Each route will be a pair of [component, template] where components are functions like in React, and templates are strings we can match against

            • Effective TypeScript › A new way to test types

              Readers of Effective TypeScript and followers of this blog will know that testing types is a long-standing interest of mine: typings-checker (2017) implemented $ExpectType and $ExpectError directives and helped to influence dtslint, which is used to test types on DefinitelyTyped.I gave a talk at TSConf 2019 entitled Testing Types: An Introduction to dtslint.I included Item 52: Be Aware of the Pitf

                Effective TypeScript › A new way to test types
              • What do you not like about DefinitelyTyped as a user and contributor? · Issue #44030 · microsoft/TypeScript

                What do you not like about DefinitelyTyped as a user and contributor? Hey folks, we, the TypeScript team at Microsoft, are interested in understanding pain points for people using and contributing to DefinitelyTyped. About this time last year, we drastically changed the workflow for contributors to DefinitelyTyped (one of the most active repos on GitHub) to allow for self-serving Pull Requests. Si

                  What do you not like about DefinitelyTyped as a user and contributor? · Issue #44030 · microsoft/TypeScript
                • GitHub - eslint-types/eslint-define-config: Provide a defineConfig function for .eslintrc.js 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.

                    GitHub - eslint-types/eslint-define-config: Provide a defineConfig function for .eslintrc.js files
                  1