Title: Typescript ignores typings when using tsconfig.json paths · Issue #17583 · microsoft/TypeScript · GitHub
Open Graph Title: Typescript ignores typings when using tsconfig.json paths · Issue #17583 · microsoft/TypeScript
X Title: Typescript ignores typings when using tsconfig.json paths · Issue #17583 · microsoft/TypeScript
Description: TypeScript Version: 2.3.4, 2.4.2, 2.5.0-dev.20170801 fabric@1.7.17 and @types/fabric are installed. Code tsconfig.json { "compilerOptions": { "target": "es5", "module": "commonjs", "baseUrl": "src/", "sourceMap": true, "outDir": "dist/ou...
Open Graph Description: TypeScript Version: 2.3.4, 2.4.2, 2.5.0-dev.20170801 fabric@1.7.17 and @types/fabric are installed. Code tsconfig.json { "compilerOptions": { "target": "es5", "module": "commonjs", "baseUrl": "src/...
X Description: TypeScript Version: 2.3.4, 2.4.2, 2.5.0-dev.20170801 fabric@1.7.17 and @types/fabric are installed. Code tsconfig.json { "compilerOptions": { "target": "es5", "mo...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/17583
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Typescript ignores typings when using tsconfig.json paths","articleBody":"**TypeScript Version:** 2.3.4, 2.4.2, 2.5.0-dev.20170801\r\n\r\n`fabric@1.7.17` and `@types/fabric` are installed.\r\n\r\n**Code**\r\n\r\ntsconfig.json\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"target\": \"es5\",\r\n \"module\": \"commonjs\",\r\n \"baseUrl\": \"src/\",\r\n \"sourceMap\": true,\r\n \"outDir\": \"dist/out-tsc\",\r\n \"paths\": {\r\n \"fabric\": [ \"../node_modules/fabric/dist/fabric.require.js\" ]\r\n }\r\n },\r\n \"exclude\": [\r\n \"node_modules\"\r\n ],\r\n \"compileOnSave\": false\r\n}\r\n```\r\n\r\nsrc/app.ts\r\n```ts\r\nimport * as fabric from \"fabric\";\r\n\r\nwindow.addEventListener(\"load\", function () {\r\n const canvas = new fabric.Canvas(\"my-canvas\");\r\n\r\n // create a rectangle object\r\n var rect = new fabric.Rect({\r\n left: 100,\r\n top: 100,\r\n fill: \"red\",\r\n width: 20,\r\n height: 20,\r\n lockUniScaling: true\r\n });\r\n\r\n // \"add\" rectangle onto canvas\r\n canvas.add(rect);\r\n\r\n // canvas.toSVG() is faulty inside definitions\r\n console.log(canvas.toSVG());\r\n});\r\n```\r\n\r\n**Expected behavior:**\r\nTSC should report an error that `toSVG` needs parameters.\r\n\r\n**Actual behavior:**\r\ntypescript doesn't load any type definitions for the fabric module.","author":{"url":"https://github.com/WoMayr","@type":"Person","name":"WoMayr"},"datePublished":"2017-08-03T09:15:56Z","url":"https://github.com/microsoft/TypeScript/issues/17583"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2bfe71c7-07b1-4b15-b531-77ef3117ddb8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8300:161320:23EAFC5:2F5E09C:6B0254B2 |
| html-safe-nonce | 615e8ead08c45200b2a50f0d277fe1dcd0dcc06cb81bcba283485f88cfb99911 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzAwOjE2MTMyMDoyM0VBRkM1OjJGNUUwOUM6NkIwMjU0QjIiLCJ2aXNpdG9yX2lkIjoiNzQxMzA2NDc5MzkyNzYwMzM3OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d8e677b17c2a6c5d6f76ccde01c666133544ec8be67a8985d4cd9ac87c59385a |
| hovercard-subject-tag | issue:247642490 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/17583/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e86a3a552e6f141122db1d9f7626a899d0f31b8c54c0ea9e6ecf9eb623e48e1e/microsoft/TypeScript/issues/17583 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e86a3a552e6f141122db1d9f7626a899d0f31b8c54c0ea9e6ecf9eb623e48e1e/microsoft/TypeScript/issues/17583 |
| og:image:alt | TypeScript Version: 2.3.4, 2.4.2, 2.5.0-dev.20170801 fabric@1.7.17 and @types/fabric are installed. Code tsconfig.json { "compilerOptions": { "target": "es5", "module": "commonjs", "baseUrl": "src/... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | WoMayr |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width