diff --git a/.local.dic b/.local.dic index ee66620fa5..f34eb99b94 100644 --- a/.local.dic +++ b/.local.dic @@ -1,16 +1,19 @@ +*google +*NPM 2FA 30KB activations -acyclic ActiveSupport +acyclic Algolia -asynchronicity Americentric +asynchronicity asynchrony -autocomplete -autotrack auto-rollup +autocomplete +autocompletion autoruns +autotrack autotracking aXe backticks @@ -24,8 +27,8 @@ camelize Chai chainable cheatsheet -Checkboxes checkboxes +Checkboxes coc-ember CoffeeScript ColorSafe @@ -44,31 +47,37 @@ datepicker de debounce declaratively +DefinitelyTyped deps draggable +dropdown durations +dynamicness EditorConfig els-addon-docs els-addon-typed-templates -enumerables ember-a11y ember-a11y-refocus ember-a11y-testing -ember-cli-deprecation-workflow ember-cli-cjs-transform +ember-cli-deprecation-workflow ember-cli-document-title ember-cli-head ember-cli-htmlbars -ember-cli-netlify ember-cli-mirage. +ember-cli-netlify ember-cli-tutorial-style +ember-cli-typescript ember-debug-handlers-polyfill ember-fast-cli ember-intl EmberData +EmberObject +enumerables erroring Evented facto +fallbacks FastPass favicon Favicon @@ -82,11 +91,10 @@ geocoding getter getters Getters -GitLab GIFs -globbing +GitLab GlimmerX -*google +globbing hackable HammerJS hardcode @@ -95,25 +103,30 @@ Hm Hoc htmlbars IE11 -interop -interoperable -invocable -invoker IndexedDB Inflector instantiation Intellisense +IntelliSense +interop +interoperable +invokable +invokables +invoker invoker invokers +JetBrains jquery-integration +JSDoc keyCode KVO lang linters -LSP lookups +LSP Mapbox MDN +metaprogramming misspelt mixin mixins @@ -123,103 +136,108 @@ natively nav nav-bar Neovim -*NPM NVDA onboarding Orca page-crafter parallelize -Param param -params +Param parameterizing +params PascalCased pipelining PR -PRs -preload -prepend -prepended pre-determined +pre-octane pre-populating pre-transition +pre-transition +preload +prepend +prepended presentational Presentational -pre-transition -pre-octane +PRs readme readonly recognizers +recursing Redux relayout renderer repo repos rerender -rerenders rerendering +rerenders routable RunDOC -Runnable runnable +Runnable runtime sandboxed scp screencasting selectable +self-referentiality serverless singularize -source-readibility Splattributes SSR stateful +subclassed subclasses subclassing subdomain subexpression -substring subfolders suboptimal subroutes substate substates +substring SuperForm +superset +swappable synergistically syntaxes -swappable tagless TalkBack teardown +template-lifecycle-dom-and-modifiers templating todo todos -treesitter -triple-backtick tooltip trackable Trackable Treeshaking +treesitter +triple-backtick typeahead +typechecker +typings UIs -URL-escaped +un-representable unordered unsilence unstyled untracked untrusted +URL-escaped usecase +v1 +v2 viewport vim-ember-hbs vim-javascript vim-js-pretty-template VM -Voilà -voilà VoiceOver +voilà +Voilà websocket -Websockets -ZEIT -yay -template-lifecycle-dom-and-modifiers working-with-html-css-and-javascript -dropdown +yay +ZEIT diff --git a/guides/release/code-editors/index.md b/guides/release/code-editors/index.md index 316270f18a..d2a038baf7 100644 --- a/guides/release/code-editors/index.md +++ b/guides/release/code-editors/index.md @@ -25,7 +25,7 @@ Stable Ember Language Server is a stable, full-featured language server. Its nam ### Workflow -[ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) - Integrates ESLint into VS Code. +[ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) - Integrates ESLint into VS Code. [EditorConfig for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig) - Attempts to override user/workspace settings with settings found in `.editorconfig` files. @@ -49,8 +49,7 @@ Prettier is an opinionated code formatting tool. It enforces a consistent style - -[Glint](https://marketplace.visualstudio.com/items?itemName=typed-ember.glint-vscode) is a set of tools to aid in developing code that uses the Glimmer VM for rendering, such as Ember.js v3.24+ and GlimmerX projects. +[Glint](https://marketplace.visualstudio.com/items?itemName=typed-ember.glint-vscode) is a set of tools to aid in developing code that uses the Glimmer VM for rendering, such as Ember.js v3.24+ and GlimmerX projects. ## Vim and Neovim @@ -76,10 +75,10 @@ or [vim-ember-hbs](https://github.com/joukevandermaas/vim-ember-hbs) - Add Ember template syntax highlighting and indentation to Vim. To get embedded highlighting will involve these additional plugins: + - [vim-javascript](https://github.com/pangloss/vim-javascript) - [vim-js-pretty-template](https://github.com/Quramy/vim-js-pretty-template) - ### Language Server Only one of these solutions should be used at a time. @@ -91,21 +90,18 @@ Example mason+LSP config [can be found here](https://github.com/NullVoxPopuli/do or [Conquer for Completion (COC) for Neovim](https://github.com/neoclide/coc.nvim) - -An Intellisense engine which takes control over all linting, hinting, and language-server integration. +An IntelliSense engine which takes control over all linting, hinting, and language-server integration. With the ember plugin [coc-ember](https://github.com/NullVoxPopuli/coc-ember) - Ember.js language server extension including useful configuration instructions. ### Snippets / Workflow - [ember.vim](https://github.com/dsawardekar/ember.vim) - Shortcuts to navigate related files with Ember.js projects. - [Ember Tools](https://github.com/AndrewRadev/ember_tools.vim) - Various tools for working with Ember.js projects. - ## Atom Atom is hackable text editor for the 21st Century. diff --git a/guides/release/pages.yml b/guides/release/pages.yml index e60257a739..b3904879c1 100644 --- a/guides/release/pages.yml +++ b/guides/release/pages.yml @@ -249,6 +249,50 @@ pages: - title: "Managing Dependencies" url: "index" +- title: "Using TypeScript" + url: "typescript" + pages: + - title: "Using TypeScript with Ember" + url: "index" + - title: "TypeScript: Getting Started" + url: "getting-started" + - title: "TypeScript: Core Concepts" + url: "core-concepts" + pages: + - title: "TypeScript and Ember" + url: "index" + - title: "TypeScript: Invokables" + url: "invokables" + - title: "TypeScript: Routing" + url: "routing" + - title: "TypeScript: Services" + url: "services" + - title: "TypeScript and EmberData" + url: "ember-data" + - title: "TypeScript: Application Development" + url: "application-development" + pages: + - title: "Introduction" + url: "index" + - title: "TypeScript: Configuration" + url: "configuration" + - title: "TypeScript: Testing" + url: "testing" + - title: "TypeScript: Converting an Existing Ember App" + url: "converting-an-app" + - title: "TypeScript: Addons" + url: "addons" + - title: "TypeScript: Additional Resources" + url: "additional-resources" + pages: + - title: "Introduction" + url: "index" + - title: "TypeScript: Gotchas and Troubleshooting" + url: "gotchas" + - title: "TypeScript: FAQ and Tips" + url: "faq" + - title: "TypeScript: Working with Ember Classic" + url: "legacy" - title: "Developer Tools" url: "toc-heading_developer-tools" is_heading: true diff --git a/guides/release/typescript/additional-resources/faq.md b/guides/release/typescript/additional-resources/faq.md new file mode 100644 index 0000000000..561555734d --- /dev/null +++ b/guides/release/typescript/additional-resources/faq.md @@ -0,0 +1,89 @@ +## What about missing types? + +### Gradually typing your app + +See ["Gradual Typing Hacks"][gradual-typing-hacks] for strategies for incrementally adding types to your app. + +### Install types for libraries + +You'll want to use library type definitions as much as possible. Many packages ship their own type definitions, and many others have community-maintained definitions from [DefinitelyTyped][], available in the `@types` name space. The first thing you should do is to look for types from other libraries: it will mean using fewer ["Gradual Typing Hacks"][gradual-typing-hacks] and getting a lot more help both from your editor and from the compiler. + +### The `types` directory + +During installation, we create a `types` directory in the root of your application and add a [`"paths"`][tsconfig-paths] mapping to your `tsconfig.json` that includes that directory in any type lookups TypeScript tries to do. This is convenient for a few things: + +- global types for your project (see the next section) +- writing types for libraries that do not have any types + +These are all fallbacks, of course, you should use the types supplied directly with a package when possible. + +#### Global types for your project + +At the root of your application or addon, we include a `types/` directory with an `index.d.ts` file in it. Anything which is part of your project but which must be declared globally can go in this file. For example, if you have data attached to the `Window` object when the page is loaded (for bootstrapping or whatever other reason), this is a good place to declare it. + +We automatically configure `index.d.ts` to be ready for [Glint][], which will make type checking work with Ember's templates. The default configuration only supports Ember's classic pairing of separate `.ts` and `.hbs` files, but Glint also supports the `