├── .gitignore ├── jest.config.js ├── test ├── tsconfig.json ├── run.ts ├── index.test.ts ├── errors.ts └── __snapshots__ │ └── index.test.ts.snap ├── src ├── index.ts ├── forkTsChecker.ts └── errorFormatter.ts ├── tsconfig.json ├── README.md ├── LICENSE ├── package.json └── .eslintrc.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'ts-jest', 3 | testEnvironment: 'node', 4 | }; -------------------------------------------------------------------------------- /test/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "include": [ 4 | "./*.ts" 5 | ] 6 | } -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | export { errorFormatter } from './errorFormatter'; 2 | export { forkTsCheckerFormatter } from './forkTsChecker'; -------------------------------------------------------------------------------- /test/run.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | import { errorFormatter } from '../src/errorFormatter'; 3 | import { errors } from './errors'; 4 | 5 | 6 | errors.forEach(e => console.log(`\n${errorFormatter(e)}\n`)); -------------------------------------------------------------------------------- /test/index.test.ts: -------------------------------------------------------------------------------- 1 | import { errorFormatter } from '../src/errorFormatter'; 2 | import { errors } from './errors'; 3 | 4 | describe('errorFormatter', () => { 5 | test('should format types', () => { 6 | errors.forEach(e => expect(errorFormatter(e)).toMatchSnapshot()); 7 | }); 8 | }); 9 | 10 | -------------------------------------------------------------------------------- /src/forkTsChecker.ts: -------------------------------------------------------------------------------- 1 | import * as chalk from 'chalk'; 2 | import { BabelCodeFrameOptions, Formatter, createCodeFrameFormatter } from 'fork-ts-checker-webpack-plugin/lib/formatter'; 3 | import { Issue } from 'fork-ts-checker-webpack-plugin/lib/issue'; 4 | import { errorFormatter } from './errorFormatter'; 5 | 6 | export const forkTsCheckerFormatter = (options?: BabelCodeFrameOptions): Formatter => (issue: Issue) => 7 | `${chalk.gray(`${issue.code}:`)} ${errorFormatter(issue.message)}${createCodeFrameFormatter(options)({...issue, code: '', message: ''})}`; -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "declaration": true, 4 | "downlevelIteration": true, 5 | "forceConsistentCasingInFileNames": true, 6 | "isolatedModules": true, 7 | "lib": ["es2017"], 8 | "module": "commonjs", 9 | "moduleResolution": "node", 10 | "noEmitOnError": true, 11 | "noErrorTruncation": true, 12 | "noFallthroughCasesInSwitch": true, 13 | "noImplicitAny": true, 14 | "noImplicitReturns": true, 15 | "noUncheckedIndexedAccess": true, 16 | "noUnusedLocals": false, 17 | "noUnusedParameters": false, 18 | "pretty": true, 19 | "outDir": "./dist", 20 | "sourceMap": true, 21 | "strict": true, 22 | "target": "es2017" 23 | }, 24 | "include": ["src/*"] 25 | } 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ts-error-formatter 2 | **Syntax highlighting for TypeScript error messages** 3 | 4 | 5 | ![NPM](https://img.shields.io/npm/l/ts-error-formatter) 6 | ![npm](https://img.shields.io/npm/v/ts-error-formatter) 7 | 8 | ![image](https://user-images.githubusercontent.com/38108/112499058-7e937500-8d5d-11eb-8cd3-ff1df3a45bbe.png) 9 | 10 | ## Installation and Usage 11 | 12 | ``` 13 | npm install --save-dev ts-error-formatter 14 | ``` 15 | 16 | The `errorFormatter` can be used either stand alone or with `fork-ts-checker-webpack-plugin`. 17 | 18 | There are two exports: 19 | 20 | * `errorFormatter: (msg: string) => string;` 21 | * The returned value will have console colored text 22 | * `forkTsCheckerFormatter: (options?: BabelCodeFrameOptions | undefined) => Formatter;` 23 | * This convenience method also adds additional Babel CodeFrame output which is the default `fork-ts-checker-webpack-plugin` formatter 24 | 25 | To use the `forkTsCheckerFormatter` simply use it with the custom formatter option in your `fork-ts-checker-webpack-plugin`'s config file. 26 | -------------------------------------------------------------------------------- /src/errorFormatter.ts: -------------------------------------------------------------------------------- 1 | import * as chalk from 'chalk'; 2 | 3 | const expected = chalk.green; 4 | const received = chalk.redBright; 5 | 6 | const typeComparison1 = (ss: string, p1: string) => 7 | ss.replace(`'${p1}'`, `'${received(p1)}'`); 8 | 9 | const typeComparison2 = (ss: string, p1: string, p2: string) => 10 | ss 11 | .replace(`'${p1}'`, `'${received(p1)}'`) 12 | .replace(`'${p2}'`, `'${expected(p2)}'`); 13 | 14 | const typeComparison3 = (ss: string, p1: string, p2: string, p3: string) => 15 | ss 16 | .replace(`'${p1}'`, `'${received(p1)}'`) 17 | .replace(`'${p2}'`, `'${received(p2)}'`) 18 | .replace(`'${p3}'`, `'${expected(p3)}'`); 19 | 20 | const highlights: Array<[message: string | RegExp, highlightFn: (substring: string, ...args: string[]) => string]> = [ 21 | [/.+ '(.+)' .+ '(.+)' .+ '(.+)'.*/, typeComparison3], 22 | [/.+ '(.+)' .+ '(.+)'.*/, typeComparison2], 23 | [/.+ '(.+)' .+\./, typeComparison1], 24 | ]; 25 | 26 | export const errorFormatter = (msg: string): string => highlights.reduce( 27 | (m: string, h) => m.replace(new RegExp(h[0], 'g'), h[1]), 28 | msg 29 | ); -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Justin Leider 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ts-error-formatter", 3 | "version": "0.2.1", 4 | "description": "Syntax highlighter for TypeScript error messages", 5 | "main": "dist/index.js", 6 | "typings": "dist/index.d.ts", 7 | "scripts": { 8 | "build": "tsc -p tsconfig.json", 9 | "clean": "rimraf ./dist", 10 | "lint:no-fix": "eslint --config='.eslintrc.js' './src/*.ts' './test/*.ts'", 11 | "lint": "npm run lint:no-fix -- --fix", 12 | "prepare": "npm run clean && npm run build", 13 | "prepublishOnly": "npm run test -- --ci --silent && npm run lint:no-fix -- --max-warnings 0", 14 | "test": "jest", 15 | "test:output": "ts-node test/run.ts", 16 | "test:watch": "jest --watch" 17 | }, 18 | "repository": { 19 | "type": "git", 20 | "url": "git+https://github.com/jleider/ts-error-formatter.git" 21 | }, 22 | "keywords": [ 23 | "typescript", 24 | "error", 25 | "formatter", 26 | "syntax", 27 | "highlight" 28 | ], 29 | "author": "jleider", 30 | "license": "MIT", 31 | "bugs": { 32 | "url": "https://github.com/jleider/ts-error-formatter/issues" 33 | }, 34 | "homepage": "https://github.com/jleider/ts-error-formatter#readme", 35 | "devDependencies": { 36 | "@types/jest": "~26.0.20", 37 | "@typescript-eslint/eslint-plugin": "~4.16.1", 38 | "@typescript-eslint/parser": "~4.16.1", 39 | "chalk": "~4.1.0", 40 | "eslint": "~7.21.0", 41 | "fork-ts-checker-webpack-plugin": "^6.2.0", 42 | "jest": "~26.6.3", 43 | "ts-jest": "~26.5.3", 44 | "ts-node": "~9.1.1", 45 | "typescript": "~4.2.2" 46 | }, 47 | "peerDependencies": { 48 | "fork-ts-checker-webpack-plugin": ">= 6.2.0" 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /test/errors.ts: -------------------------------------------------------------------------------- 1 | export const errors: string[] = [ 2 | `Type '{ id: number; email: string; firstName: string; lastName: string; phoneNumber: Option; phoneExtension: Option; company: Option; title: Option; linkedinUrl: Option; twitterUrl: Option; facebookUrl: Option; primaryClientId: number; subscribed: false; personaId: Option; }' is not assignable to type '{ id: number; email: string; firstName: string; lastName: string; phoneNumber: Option; phoneExtension: Option; company: Option; title: Option; linkedinUrl: Option; twitterUrl: Option; facebookUrl: Option; primaryClientId: number; activeCampaignId: Option; personaId: Option; }'. 3 | Object literal may only specify known properties, and 'subscribed' does not exist in type '{ id: number; email: string; firstName: string; lastName: string; phoneNumber: Option; phoneExtension: Option; company: Option; title: Option; linkedinUrl: Option; twitterUrl: Option; facebookUrl: Option; primaryClientId: number; activeCampaignId: Option; personaId: Option; }'.`, 4 | 5 | `Type '{ mySiteItems: Parser>; mySiteOffering: Parser>; mySiteItemsRatings: Parser>; mySiteItemsRoadshows: Parser>; mySiteDocuments: Parser>; mySiteDocumentsCategories: Parser>; mySiteDocumentsLetter: Parser>; mySiteChangeApproval: Parser>; tipsAndToolsPersonalizedTips: Parser; tipsAndToolsBestPractices: Parser; tipsAndToolsUserGuides: Parser; analyticsDocumentStatistics: Parser; analyticsSiteActivity: Parser; analyticsDocumentStatisticsDocumentActivity: Parser; analyticsUserActivity: Parser; analyticsUserActivityDetails: Parser; analyticsDebriefs: Parser; Insights: Parser>; InsightsQuery: Parser>; dashboard: Parser>; }' is not assignable to type '{ readonly dashboard: Parser>; readonly analyticsDocumentStatistics: Parser>; readonly analyticsDocumentStatisticsDocumentActivity: Parser>; readonly analyticsDebriefs: Parser>; readonly analyticsSiteActivity: Parser>; readonly analyticsUserActivity: Parser>; readonly analyticsUserActivityDetails: Parser>; readonly Insights: Parser>; readonly mySiteItems: Parser>; readonly mySiteOffering: Parser>; readonly mySiteItemsRatings: Parser>; readonly mySiteItemsRoadshows: Parser>; readonly mySiteChangeApproval: Parser>; readonly mySiteDocuments: Parser>; readonly mySiteDocumentsCategories: Parser>; readonly mySiteDocumentsLetter: Parser>; readonly tipsAndToolsBestPractices: Parser>; readonly tipsAndToolsPersonalizedTips: Parser>; readonly tipsAndToolsUserGuides: Parser>; }'. 6 | Types of property 'dashboard' are incompatible. 7 | Type 'Parser>' is not assignable to type 'Parser>'. 8 | Type 'PageMeta<{}>' is not assignable to type 'PageMeta'. 9 | Type 'PageMeta<{}>' is not assignable to type '{ readonly description: () => Option; readonly renderEquality: (next: PageMeta, current: PageMeta) => boolean; readonly dataMeta: Option>; readonly route: Match; }'. 10 | Types of property 'renderEquality' are incompatible. 11 | Type '(next: PageMeta<{}>, current: PageMeta<{}>) => boolean' is not assignable to type '(next: PageMeta, current: PageMeta) => boolean'. 12 | Types of parameters 'next' and 'next' are incompatible. 13 | Type 'PageMeta' is not assignable to type 'PageMeta<{}>'. 14 | Type 'PageMeta' is not assignable to type '{ readonly description: () => Option; readonly renderEquality: (next: PageMeta<{}>, current: PageMeta<{}>) => boolean; readonly dataMeta: Option>; readonly route: Match<{}>; }'. 15 | The types of 'route.parser' are incompatible between these types. 16 | Type 'Parser' is not assignable to type 'Parser<{}>'. 17 | Type 'unknown' is not assignable to type '{}'.`, 18 | 19 | `Type '{ id: number; email: string; firstName: string; lastName: string; phoneNumber: Option; phoneExtension: Option; company: Option; title: Option; linkedinUrl: Option; twitterUrl: Option; facebookUrl: Option; primaryClientId: number; subscribed: false; personaId: Option; }' is not assignable to type '{ id: number; email: string; firstName: string; lastName: string; phoneNumber: Option; phoneExtension: Option; company: Option; title: Option; linkedinUrl: Option; twitterUrl: Option; facebookUrl: Option; primaryClientId: number; activeCampaignId: Option; personaId: Option; }'. 20 | Object literal may only specify known properties, and 'subscribed' does not exist in type '{ id: number; email: string; firstName: string; lastName: string; phoneNumber: Option; phoneExtension: Option; company: Option; title: Option; linkedinUrl: Option; twitterUrl: Option; facebookUrl: Option; primaryClientId: number; activeCampaignId: Option; personaId: Option; }'. 21 | 22 | Type 'Codec, Option | null | undefined>' is not assignable to type 'Codec'. 23 | The types returned by 'decode(...)' are incompatible between these types. 24 | Type 'Validation>' is not assignable to type 'Validation'. 25 | Type 'Right>' is not assignable to type 'Validation'. 26 | Type 'Right>' is not assignable to type 'Right'. 27 | Type 'Option' is not assignable to type 'number'. 28 | Type 'None' is not assignable to type 'number'.`, 29 | 30 | `Type '{ curr: string; }' is missing the following properties from type 'ColorContent': type, val`, 31 | 32 | `The type 'readonly [Element, Element]' is 'readonly' and cannot be assigned to the mutable type '[left: ReactElement>, right: ReactElement>]'.` 33 | ]; 34 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | es6: true, 4 | node: true, 5 | jest: true, 6 | }, 7 | extends: [ 8 | "eslint:recommended", 9 | ], 10 | parser: "@typescript-eslint/parser", 11 | parserOptions: { 12 | project: [ 13 | "tsconfig.json", 14 | "test/tsconfig.json" 15 | ], 16 | }, 17 | plugins: [ 18 | "@typescript-eslint", 19 | ], 20 | reportUnusedDisableDirectives: true, 21 | rules: { 22 | "@typescript-eslint/adjacent-overload-signatures": "warn", 23 | "@typescript-eslint/array-type": [ 24 | "warn", 25 | { 26 | default: "array-simple", 27 | readonly: "generic" 28 | }, 29 | ], 30 | "@typescript-eslint/ban-ts-comment": "warn", 31 | "@typescript-eslint/ban-types": [ 32 | "warn", 33 | { 34 | "types": { 35 | "{}": false, 36 | }, 37 | extendDefaults: true, 38 | } 39 | ], 40 | "@typescript-eslint/consistent-type-assertions": "off", // * 41 | "@typescript-eslint/consistent-type-definitions": "off", 42 | "@typescript-eslint/dot-notation": "warn", 43 | "@typescript-eslint/explicit-member-accessibility": [ 44 | "warn", 45 | { 46 | accessibility: "no-public", 47 | }, 48 | ], 49 | "@typescript-eslint/explicit-module-boundary-types": "off", 50 | "@typescript-eslint/indent": "off", 51 | "@typescript-eslint/interface-name-prefix": "off", 52 | "@typescript-eslint/member-delimiter-style": [ 53 | "warn", 54 | { 55 | multiline: { 56 | delimiter: "semi", 57 | requireLast: true, 58 | }, 59 | singleline: { 60 | delimiter: "comma", 61 | requireLast: false, 62 | }, 63 | }, 64 | ], 65 | "@typescript-eslint/no-empty-function": "warn", 66 | "@typescript-eslint/no-empty-interface": "warn", 67 | "@typescript-eslint/no-explicit-any": "off", // we might want this on 68 | "@typescript-eslint/no-floating-promises": "off", 69 | "@typescript-eslint/no-implied-eval": "warn", 70 | "@typescript-eslint/no-inferrable-types": "off", // * 71 | "@typescript-eslint/no-misused-new": "warn", 72 | "@typescript-eslint/no-misused-promises": "warn", 73 | "@typescript-eslint/no-namespace": "warn", 74 | "@typescript-eslint/no-parameter-properties": "off", 75 | "@typescript-eslint/no-redeclare": "warn", 76 | "@typescript-eslint/no-require-imports": "warn", 77 | "@typescript-eslint/no-shadow": [ 78 | "warn", 79 | { 80 | ignoreTypeValueShadow: true, 81 | } 82 | ], 83 | "@typescript-eslint/no-this-alias": "warn", 84 | "@typescript-eslint/no-unnecessary-boolean-literal-compare": "off", // * was error 85 | "@typescript-eslint/no-unnecessary-type-arguments": "warn", 86 | "@typescript-eslint/no-unnecessary-type-assertion": "warn", 87 | "@typescript-eslint/no-unsafe-assignment": "warn", 88 | "@typescript-eslint/no-unsafe-call": "warn", 89 | "@typescript-eslint/no-unsafe-member-access": "off", // Would be nice to be able to turn on 90 | "@typescript-eslint/no-unsafe-return": "off", // Would be nice to be able to turn on 91 | "@typescript-eslint/no-unused-expressions": [ 92 | "warn", 93 | { 94 | "allowShortCircuit": true, 95 | "allowTernary": true, 96 | "allowTaggedTemplates": true 97 | } 98 | ], 99 | "@typescript-eslint/no-unused-vars": "warn", 100 | "@typescript-eslint/no-use-before-define": "off", 101 | "@typescript-eslint/no-var-requires": "warn", 102 | "@typescript-eslint/prefer-for-of": "warn", 103 | "@typescript-eslint/prefer-function-type": "warn", 104 | "@typescript-eslint/prefer-namespace-keyword": "warn", 105 | "@typescript-eslint/prefer-readonly": "warn", 106 | "@typescript-eslint/prefer-regexp-exec": "warn", 107 | "@typescript-eslint/restrict-template-expressions": "off", 108 | "@typescript-eslint/restrict-plus-operands": "warn", 109 | "@typescript-eslint/semi": ["warn"], 110 | "@typescript-eslint/strict-boolean-expressions": "off", // * 111 | "@typescript-eslint/triple-slash-reference": [ 112 | "warn", 113 | { 114 | path: "always", 115 | types: "prefer-import", 116 | lib: "always", 117 | }, 118 | ], 119 | "@typescript-eslint/typedef": [ 120 | "warn", 121 | { 122 | "parameter": true, 123 | "propertyDeclaration": true, 124 | } 125 | ], 126 | "@typescript-eslint/unbound-method": "off", // * 127 | "@typescript-eslint/unified-signatures": "warn", 128 | "arrow-parens": ["off", "always"], 129 | "camelcase": "warn", 130 | "comma-dangle": "off", 131 | "comma-spacing": "warn", 132 | "complexity": "off", 133 | "constructor-super": "warn", 134 | "eol-last": "off", 135 | "eqeqeq": ["warn", "smart"], 136 | "guard-for-in": "warn", 137 | "id-blacklist": [ 138 | "warn", 139 | "any", 140 | "Number", 141 | "number", 142 | "String", 143 | "string", 144 | "Boolean", 145 | "boolean", 146 | "Undefined", 147 | "undefined", 148 | ], 149 | "id-match": "warn", 150 | "import/order": "off", 151 | "max-classes-per-file": "off", 152 | "max-len": "off", 153 | "new-parens": "warn", 154 | "no-bitwise": "warn", 155 | "no-caller": "warn", 156 | "no-cond-assign": "warn", 157 | "no-console": "warn", 158 | "no-debugger": "warn", 159 | "no-duplicate-imports": "warn", 160 | "no-empty": "warn", 161 | "no-eval": "warn", 162 | "no-extra-bind": "warn", 163 | "no-extra-boolean-cast": "warn", 164 | "no-case-declarations": "warn", 165 | "no-constant-condition": "warn", 166 | "no-fallthrough": "off", // Handled by tsconfig option 167 | "no-invalid-this": "off", // * was warn 168 | "no-irregular-whitespace": "warn", 169 | "no-multiple-empty-lines": "off", 170 | "no-new-wrappers": "warn", 171 | "no-prototype-builtins": "warn", 172 | "no-redeclare": "off", // Handled by @typescript-eslint/no-redeclare 173 | "no-shadow": "off", // Handled by @typescript-eslint/no-shadow 174 | "no-throw-literal": "warn", 175 | "no-trailing-spaces": "warn", 176 | "no-undef-init": "warn", 177 | "no-underscore-dangle": "off", // * was warn 178 | "no-unexpected-multiline": "warn", 179 | "no-unused-expressions": "off", // Disabled because of @typescript-eslint/no-unused-expressions 180 | "no-unsafe-finally": "warn", 181 | "no-unsafe-optional-chaining": "warn", 182 | "no-unused-labels": "warn", 183 | "no-unused-vars": "off", // Disabled because of @typescript-eslint/no-unused-vars 184 | "no-useless-escape": "warn", 185 | "no-var": "warn", 186 | "no-void": ["warn", { "allowAsStatement": true }], 187 | "object-shorthand": "off", 188 | "one-var": ["off", "never"], 189 | "prefer-arrow/prefer-arrow-functions": "off", 190 | "prefer-const": "warn", 191 | "quotes": ["warn", "single", { "avoidEscape": true, "allowTemplateLiterals": true }], 192 | "quote-props": "off", 193 | "radix": "off", 194 | "sort-imports": "warn", 195 | "spaced-comment": ["warn", "always", { "exceptions": ["*-"], "markers": ["/"] }], 196 | "use-isnan": "warn", 197 | "valid-typeof": ["warn", { "requireStringLiterals": true }] 198 | } 199 | }; 200 | -------------------------------------------------------------------------------- /test/__snapshots__/index.test.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`errorFormatter should format types 1`] = ` 4 | "Type '{ id: number; email: string; firstName: string; lastName: string; phoneNumber: Option; phoneExtension: Option; company: Option; title: Option; linkedinUrl: Option; twitterUrl: Option; facebookUrl: Option; primaryClientId: number; subscribed: false; personaId: Option; }' is not assignable to type '{ id: number; email: string; firstName: string; lastName: string; phoneNumber: Option; phoneExtension: Option; company: Option; title: Option; linkedinUrl: Option; twitterUrl: Option; facebookUrl: Option; primaryClientId: number; activeCampaignId: Option; personaId: Option; }'. 5 | Object literal may only specify known properties, and 'subscribed' does not exist in type '{ id: number; email: string; firstName: string; lastName: string; phoneNumber: Option; phoneExtension: Option; company: Option; title: Option; linkedinUrl: Option; twitterUrl: Option; facebookUrl: Option; primaryClientId: number; activeCampaignId: Option; personaId: Option; }'." 6 | `; 7 | 8 | exports[`errorFormatter should format types 2`] = ` 9 | "Type '{ mySiteItems: Parser>; mySiteOffering: Parser>; mySiteItemsRatings: Parser>; mySiteItemsRoadshows: Parser>; mySiteDocuments: Parser>; mySiteDocumentsCategories: Parser>; mySiteDocumentsLetter: Parser>; mySiteChangeApproval: Parser>; tipsAndToolsPersonalizedTips: Parser; tipsAndToolsBestPractices: Parser; tipsAndToolsUserGuides: Parser; analyticsDocumentStatistics: Parser; analyticsSiteActivity: Parser; analyticsDocumentStatisticsDocumentActivity: Parser; analyticsUserActivity: Parser; analyticsUserActivityDetails: Parser; analyticsDebriefs: Parser; Insights: Parser>; InsightsQuery: Parser>; dashboard: Parser>; }' is not assignable to type '{ readonly dashboard: Parser>; readonly analyticsDocumentStatistics: Parser>; readonly analyticsDocumentStatisticsDocumentActivity: Parser>; readonly analyticsDebriefs: Parser>; readonly analyticsSiteActivity: Parser>; readonly analyticsUserActivity: Parser>; readonly analyticsUserActivityDetails: Parser>; readonly Insights: Parser>; readonly mySiteItems: Parser>; readonly mySiteOffering: Parser>; readonly mySiteItemsRatings: Parser>; readonly mySiteItemsRoadshows: Parser>; readonly mySiteChangeApproval: Parser>; readonly mySiteDocuments: Parser>; readonly mySiteDocumentsCategories: Parser>; readonly mySiteDocumentsLetter: Parser>; readonly tipsAndToolsBestPractices: Parser>; readonly tipsAndToolsPersonalizedTips: Parser>; readonly tipsAndToolsUserGuides: Parser>; }'. 10 | Types of property 'dashboard' are incompatible. 11 | Type 'Parser>' is not assignable to type 'Parser>'. 12 | Type 'PageMeta<{}>' is not assignable to type 'PageMeta'. 13 | Type 'PageMeta<{}>' is not assignable to type '{ readonly description: () => Option; readonly renderEquality: (next: PageMeta, current: PageMeta) => boolean; readonly dataMeta: Option>; readonly route: Match; }'. 14 | Types of property 'renderEquality' are incompatible. 15 | Type '(next: PageMeta<{}>, current: PageMeta<{}>) => boolean' is not assignable to type '(next: PageMeta, current: PageMeta) => boolean'. 16 | Types of parameters 'next' and 'next' are incompatible. 17 | Type 'PageMeta' is not assignable to type 'PageMeta<{}>'. 18 | Type 'PageMeta' is not assignable to type '{ readonly description: () => Option; readonly renderEquality: (next: PageMeta<{}>, current: PageMeta<{}>) => boolean; readonly dataMeta: Option>; readonly route: Match<{}>; }'. 19 | The types of 'route.parser' are incompatible between these types. 20 | Type 'Parser' is not assignable to type 'Parser<{}>'. 21 | Type 'unknown' is not assignable to type '{}'." 22 | `; 23 | 24 | exports[`errorFormatter should format types 3`] = ` 25 | "Type '{ id: number; email: string; firstName: string; lastName: string; phoneNumber: Option; phoneExtension: Option; company: Option; title: Option; linkedinUrl: Option; twitterUrl: Option; facebookUrl: Option; primaryClientId: number; subscribed: false; personaId: Option; }' is not assignable to type '{ id: number; email: string; firstName: string; lastName: string; phoneNumber: Option; phoneExtension: Option; company: Option; title: Option; linkedinUrl: Option; twitterUrl: Option; facebookUrl: Option; primaryClientId: number; activeCampaignId: Option; personaId: Option; }'. 26 | Object literal may only specify known properties, and 'subscribed' does not exist in type '{ id: number; email: string; firstName: string; lastName: string; phoneNumber: Option; phoneExtension: Option; company: Option; title: Option; linkedinUrl: Option; twitterUrl: Option; facebookUrl: Option; primaryClientId: number; activeCampaignId: Option; personaId: Option; }'. 27 | 28 | Type 'Codec, Option | null | undefined>' is not assignable to type 'Codec'. 29 | The types returned by 'decode(...)' are incompatible between these types. 30 | Type 'Validation>' is not assignable to type 'Validation'. 31 | Type 'Right>' is not assignable to type 'Validation'. 32 | Type 'Right>' is not assignable to type 'Right'. 33 | Type 'Option' is not assignable to type 'number'. 34 | Type 'None' is not assignable to type 'number'." 35 | `; 36 | 37 | exports[`errorFormatter should format types 4`] = `"Type '{ curr: string; }' is missing the following properties from type 'ColorContent': type, val"`; 38 | 39 | exports[`errorFormatter should format types 5`] = `"The type 'readonly [Element, Element]' is 'readonly' and cannot be assigned to the mutable type '[left: ReactElement>, right: ReactElement>]'."`; 40 | --------------------------------------------------------------------------------