diff --git a/docs/angular/guides/modern-angular/karma-to-jest.md b/docs/angular/guides/modern-angular/karma-to-jest.md index b0eb35a618..4e89788539 100644 --- a/docs/angular/guides/modern-angular/karma-to-jest.md +++ b/docs/angular/guides/modern-angular/karma-to-jest.md @@ -65,20 +65,20 @@ This step is very manual and varies widely based on the usage of features from v - Bare spies - Jasmine - ```ts + ```typescript const myMock = jasmine.createSpy('myMock); ``` - Jest - ```ts + ```typescript const myMock = jest.fn(); ``` - Spies on existing objects - Jasmine - ```ts + ```typescript spyOn(foo, 'setBar'); ``` - Jest - ```ts + ```typescript jest.spyOn(foo, ‘setBar’); ``` diff --git a/docs/angular/guides/storybook-plugin.md b/docs/angular/guides/storybook-plugin.md index 6876e99418..2546c3b676 100644 --- a/docs/angular/guides/storybook-plugin.md +++ b/docs/angular/guides/storybook-plugin.md @@ -92,7 +92,7 @@ Changing knobs in the url query parameters allows your Cypress tests to test dif **\*.component.stories.ts file** -```ts +```typescript import { text, number } from '@storybook/addon-knobs'; import { ButtonComponent } from './button.component'; @@ -115,7 +115,7 @@ export const primary = () => ({ **Cypress \*.spec.ts file** -```ts +```typescript describe('shared-ui', () => { beforeEach(() => cy.visit( diff --git a/docs/react/getting-started/EGH_ScalingReactNx.png b/docs/react/getting-started/EGH_ScalingReactNx.png index dc1225d19d..61cde0baba 100644 Binary files a/docs/react/getting-started/EGH_ScalingReactNx.png and b/docs/react/getting-started/EGH_ScalingReactNx.png differ diff --git a/docs/react/guides/storybook-plugin.md b/docs/react/guides/storybook-plugin.md index 6e31d16d9a..a3cd0dac58 100644 --- a/docs/react/guides/storybook-plugin.md +++ b/docs/react/guides/storybook-plugin.md @@ -83,7 +83,7 @@ Changing knobs in the url query parameters allows your Cypress tests to test dif **\*.stories.tsx file** -```ts +```typescript import React from 'react'; import { text, number } from '@storybook/addon-knobs'; import { Button } from './button'; @@ -97,7 +97,7 @@ export const primary = () => ( **Cypress \*.spec.ts file** -```ts +```typescript describe('shared-ui', () => { beforeEach(() => cy.visit( diff --git a/docs/react/migration/migration-cra.md b/docs/react/migration/migration-cra.md index 2c12a78e6c..9f0e92cb7f 100644 --- a/docs/react/migration/migration-cra.md +++ b/docs/react/migration/migration-cra.md @@ -208,7 +208,7 @@ nx generate lib ui-button The new library can be used in your app like by adding this code to `App.tsx`: -```tsx +```typescriptx //... import { UiButton } from '@acme/ui-button'; //... diff --git a/docs/shared/tools-workspace-builders.md b/docs/shared/tools-workspace-builders.md index c21337aa94..6ad04fa406 100644 --- a/docs/shared/tools-workspace-builders.md +++ b/docs/shared/tools-workspace-builders.md @@ -51,7 +51,7 @@ In our `impl.ts` file, we're creating an `Options` interface that matches the js The `impl.ts` contains the actual code for your builder. Your builder should use the `createBuilder` function of the `@angular-devkit/architect` package to create a builder that can be run via the Nx CLI tools. -```ts +```typescript import { BuilderOutput, createBuilder } from '@angular-devkit/architect'; import * as childProcess from 'child_process'; import { Observable } from 'rxjs'; @@ -89,7 +89,7 @@ Part of the power of the architect API is the ability to compose builders via ex Here's an example of this (from a hypothetical project), that will serve an api (project name: "api") in watch mode, then serve a frontend app (project name: "web-client") in watch mode: -```ts +```typescript import { BuilderContext, BuilderOutput, @@ -178,7 +178,7 @@ The first difference to adjust is to mark the executor as an Nx Executor in the Your executor's implementation must consist of a function that takes an options object and returns a `Promise<{ success: boolean }>`. Given the echo implementation provided in the Angular Devkit Builder section above, our Nx executor would look like this: -```ts +```typescript import * as childProcess from 'child_process'; interface Options { diff --git a/docs/shared/tools-workspace-generators.md b/docs/shared/tools-workspace-generators.md index 24e9558b52..441cce24c3 100644 --- a/docs/shared/tools-workspace-generators.md +++ b/docs/shared/tools-workspace-generators.md @@ -31,7 +31,7 @@ The `schema.json` provides a description of the generator, available options, va The initial generator function creates a library. -```ts +```typescript import { Tree, formatFiles, installPackagesTask } from '@nrwl/devkit'; import { libraryGenerator } from '@nrwl/workspace'; @@ -117,7 +117,7 @@ happynrwl/ Next, update the `index.ts` file for the schematic, and create different rules for generating a library, and generating the new files. Both rules have access to the available options provided for the schematic. -```ts +```typescript import { apply, chain, @@ -195,7 +195,7 @@ UPDATE package.json (1959 bytes) To create a TypeScript schema to use in your generator function, define a TypeScript file next to your schema.json named schema.ts. Inside the schema.ts, define an interface to match the properties in your schema.json file, and whether they are required. -```ts +```typescript export interface SchematicOptions { name: string; type?: string; @@ -204,7 +204,7 @@ export interface SchematicOptions { Import the TypeScript schema into your generator file and replace the any in your generator function with the interface. -```ts +```typescript import { Tree, formatFiles, installPackagesTask } from '@nrwl/devkit'; import { libraryGenerator } from '@nrwl/workspace'; diff --git a/docs/shared/workspace/library-types.md b/docs/shared/workspace/library-types.md index 1182992056..8d4a9ab557 100644 --- a/docs/shared/workspace/library-types.md +++ b/docs/shared/workspace/library-types.md @@ -97,7 +97,7 @@ A utility library can depend only on utility libraries. An example ui lib module: **libs/shared/util-formatting** -```ts +```typescript export { formatDate, formatTime } from './src/format-date-fns'; export { formatCurrency } from './src/format-currency'; ```