fastify / fastify

Fast and low overhead web framework, for Node.js

Home Page:https://www.fastify.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typescript tsc throws multiple errors and fails to compile with fastify 4.26.1

cptully opened this issue · comments

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

4.26.1

Plugin version

No response

Node.js version

20.11.1

Operating system

macOS

Operating system version (i.e. 20.04, 11.3, 10)

14.3.1

Description

In my typescript project that does make use of fastify, I am trying to resolve vulnerabilities as reported by multiple tools. We were using fastify 3.28.0 and tsc was perfectly happy but with fastify 4.x I get almost 300 errors!

[publishing-service 3/3] RUN npm run build:
0.306
0.306 > ke-publishing@0.0.1 build
0.306 > tsc -p tsconfig.prod.json
0.306
1.587 node_modules/fastify/types/instance.d.ts(205,5): error TS1139: Type parameter declaration expected.
1.587 node_modules/fastify/types/instance.d.ts(205,26): error TS1005: ',' expected.
1.587 node_modules/fastify/types/instance.d.ts(206,3): error TS1109: Expression expected.
1.587 node_modules/fastify/types/instance.d.ts(206,9): error TS1005: ')' expected.
1.587 node_modules/fastify/types/instance.d.ts(206,123): error TS1005: ';' expected.
1.587 node_modules/fastify/types/instance.d.ts(206,124): error TS1128: Declaration or statement expected.
1.587 node_modules/fastify/types/instance.d.ts(212,9): error TS1109: Expression expected.
1.587 node_modules/fastify/types/instance.d.ts(218,18): error TS1005: ';' expected.
1.587 node_modules/fastify/types/instance.d.ts(220,20): error TS1005: ';' expected.
1.587 node_modules/fastify/types/instance.d.ts(221,3): error TS1109: Expression expected.
1.587 node_modules/fastify/types/instance.d.ts(221,9): error TS1005: ')' expected.
1.587 node_modules/fastify/types/instance.d.ts(221,155): error TS1005: ';' expected.
1.587 node_modules/fastify/types/instance.d.ts(221,156): error TS1128: Declaration or statement expected.
1.587 node_modules/fastify/types/instance.d.ts(224,18): error TS1005: ';' expected.
1.587 node_modules/fastify/types/instance.d.ts(226,20): error TS1005: ';' expected.
1.587 node_modules/fastify/types/instance.d.ts(227,3): error TS1109: Expression expected.
1.588 node_modules/fastify/types/instance.d.ts(227,9): error TS1005: ')' expected.
1.588 node_modules/fastify/types/instance.d.ts(227,155): error TS1005: ';' expected.
1.588 node_modules/fastify/types/instance.d.ts(227,156): error TS1128: Declaration or statement expected.
1.588 node_modules/fastify/types/instance.d.ts(238,18): error TS1005: ';' expected.
1.588 node_modules/fastify/types/instance.d.ts(240,20): error TS1005: ';' expected.
1.588 node_modules/fastify/types/instance.d.ts(241,12): error TS1005: ';' expected.
1.588 node_modules/fastify/types/instance.d.ts(242,8): error TS1005: ';' expected.
1.588 node_modules/fastify/types/instance.d.ts(242,265): error TS1005: ';' expected.
1.588 node_modules/fastify/types/instance.d.ts(243,3): error TS1109: Expression expected.
1.588 node_modules/fastify/types/instance.d.ts(244,9): error TS1005: ')' expected.
1.588 node_modules/fastify/types/instance.d.ts(245,9): error TS1005: ';' expected.
1.588 node_modules/fastify/types/instance.d.ts(245,11): error TS1434: Unexpected keyword or identifier.
1.588 node_modules/fastify/types/instance.d.ts(245,14): error TS1128: Declaration or statement expected.
1.588 node_modules/fastify/types/instance.d.ts(245,35): error TS1005: ':' expected.
1.588 node_modules/fastify/types/instance.d.ts(245,308): error TS1005: ';' expected.
1.588 node_modules/fastify/types/instance.d.ts(246,3): error TS1109: Expression expected.
1.588 node_modules/fastify/types/instance.d.ts(246,4): error TS1128: Declaration or statement expected.
1.588 node_modules/fastify/types/instance.d.ts(253,18): error TS1005: ';' expected.
1.588 node_modules/fastify/types/instance.d.ts(255,20): error TS1005: ';' expected.
1.588 node_modules/fastify/types/instance.d.ts(256,12): error TS1005: ';' expected.
1.588 node_modules/fastify/types/instance.d.ts(257,8): error TS1005: ';' expected.
1.588 node_modules/fastify/types/instance.d.ts(257,267): error TS1005: ';' expected.
1.588 node_modules/fastify/types/instance.d.ts(258,3): error TS1109: Expression expected.
1.588 node_modules/fastify/types/instance.d.ts(259,9): error TS1005: ')' expected.
1.588 node_modules/fastify/types/instance.d.ts(260,9): error TS1005: ';' expected.
1.588 node_modules/fastify/types/instance.d.ts(260,11): error TS1434: Unexpected keyword or identifier.
1.588 node_modules/fastify/types/instance.d.ts(260,14): error TS1128: Declaration or statement expected.
1.588 node_modules/fastify/types/instance.d.ts(260,35): error TS1005: ':' expected.
1.588 node_modules/fastify/types/instance.d.ts(260,310): error TS1005: ';' expected.
1.588 node_modules/fastify/types/instance.d.ts(261,3): error TS1109: Expression expected.
1.588 node_modules/fastify/types/instance.d.ts(261,4): error TS1128: Declaration or statement expected.
1.588 node_modules/fastify/types/instance.d.ts(267,18): error TS1005: ';' expected.
1.588 node_modules/fastify/types/instance.d.ts(269,20): error TS1005: ';' expected.
1.588 node_modules/fastify/types/instance.d.ts(270,12): error TS1005: ';' expected.
1.588 node_modules/fastify/types/instance.d.ts(271,8): error TS1005: ';' expected.
1.588 node_modules/fastify/types/instance.d.ts(271,273): error TS1005: ';' expected.
1.588 node_modules/fastify/types/instance.d.ts(272,3): error TS1109: Expression expected.
1.588 node_modules/fastify/types/instance.d.ts(273,9): error TS1005: ')' expected.
1.588 node_modules/fastify/types/instance.d.ts(274,9): error TS1005: ';' expected.
1.588 node_modules/fastify/types/instance.d.ts(274,11): error TS1434: Unexpected keyword or identifier.
1.588 node_modules/fastify/types/instance.d.ts(274,14): error TS1128: Declaration or statement expected.
1.588 node_modules/fastify/types/instance.d.ts(274,35): error TS1005: ':' expected.
1.588 node_modules/fastify/types/instance.d.ts(274,316): error TS1005: ';' expected.
1.588 node_modules/fastify/types/instance.d.ts(275,3): error TS1109: Expression expected.
1.588 node_modules/fastify/types/instance.d.ts(275,4): error TS1128: Declaration or statement expected.
1.589 node_modules/fastify/types/instance.d.ts(281,18): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(283,20): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(284,12): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(285,8): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(285,267): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(286,3): error TS1109: Expression expected.
1.589 node_modules/fastify/types/instance.d.ts(287,9): error TS1005: ')' expected.
1.589 node_modules/fastify/types/instance.d.ts(288,9): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(288,11): error TS1434: Unexpected keyword or identifier.
1.589 node_modules/fastify/types/instance.d.ts(288,14): error TS1128: Declaration or statement expected.
1.589 node_modules/fastify/types/instance.d.ts(288,35): error TS1005: ':' expected.
1.589 node_modules/fastify/types/instance.d.ts(288,310): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(289,3): error TS1109: Expression expected.
1.589 node_modules/fastify/types/instance.d.ts(289,4): error TS1128: Declaration or statement expected.
1.589 node_modules/fastify/types/instance.d.ts(296,29): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(297,18): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(299,20): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(300,12): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(301,8): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(301,329): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(302,3): error TS1109: Expression expected.
1.589 node_modules/fastify/types/instance.d.ts(303,9): error TS1005: ')' expected.
1.589 node_modules/fastify/types/instance.d.ts(304,9): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(304,11): error TS1434: Unexpected keyword or identifier.
1.589 node_modules/fastify/types/instance.d.ts(304,14): error TS1128: Declaration or statement expected.
1.589 node_modules/fastify/types/instance.d.ts(304,35): error TS1005: ':' expected.
1.589 node_modules/fastify/types/instance.d.ts(304,372): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(305,3): error TS1109: Expression expected.
1.589 node_modules/fastify/types/instance.d.ts(305,4): error TS1128: Declaration or statement expected.
1.589 node_modules/fastify/types/instance.d.ts(312,19): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(313,18): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(315,20): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(316,12): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(317,8): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(317,289): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(318,3): error TS1109: Expression expected.
1.589 node_modules/fastify/types/instance.d.ts(319,9): error TS1005: ')' expected.
1.589 node_modules/fastify/types/instance.d.ts(320,9): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(320,11): error TS1434: Unexpected keyword or identifier.
1.589 node_modules/fastify/types/instance.d.ts(320,14): error TS1128: Declaration or statement expected.
1.589 node_modules/fastify/types/instance.d.ts(320,35): error TS1005: ':' expected.
1.589 node_modules/fastify/types/instance.d.ts(320,332): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(321,3): error TS1109: Expression expected.
1.589 node_modules/fastify/types/instance.d.ts(321,4): error TS1128: Declaration or statement expected.
1.589 node_modules/fastify/types/instance.d.ts(328,18): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(330,20): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(331,12): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(332,8): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(332,267): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(333,3): error TS1109: Expression expected.
1.589 node_modules/fastify/types/instance.d.ts(334,9): error TS1005: ')' expected.
1.589 node_modules/fastify/types/instance.d.ts(335,9): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(335,11): error TS1434: Unexpected keyword or identifier.
1.589 node_modules/fastify/types/instance.d.ts(335,14): error TS1128: Declaration or statement expected.
1.589 node_modules/fastify/types/instance.d.ts(335,35): error TS1005: ':' expected.
1.589 node_modules/fastify/types/instance.d.ts(335,310): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(336,3): error TS1109: Expression expected.
1.589 node_modules/fastify/types/instance.d.ts(336,4): error TS1128: Declaration or statement expected.
1.589 node_modules/fastify/types/instance.d.ts(343,18): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(345,20): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(346,12): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(347,8): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(347,265): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(348,3): error TS1109: Expression expected.
1.589 node_modules/fastify/types/instance.d.ts(349,9): error TS1005: ')' expected.
1.589 node_modules/fastify/types/instance.d.ts(350,9): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(350,11): error TS1434: Unexpected keyword or identifier.
1.589 node_modules/fastify/types/instance.d.ts(350,14): error TS1128: Declaration or statement expected.
1.589 node_modules/fastify/types/instance.d.ts(350,35): error TS1005: ':' expected.
1.589 node_modules/fastify/types/instance.d.ts(350,308): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(351,3): error TS1109: Expression expected.
1.589 node_modules/fastify/types/instance.d.ts(351,4): error TS1128: Declaration or statement expected.
1.589 node_modules/fastify/types/instance.d.ts(359,18): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(361,20): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(362,12): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(363,8): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(363,275): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(364,3): error TS1109: Expression expected.
1.589 node_modules/fastify/types/instance.d.ts(365,9): error TS1005: ')' expected.
1.589 node_modules/fastify/types/instance.d.ts(366,9): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(366,11): error TS1434: Unexpected keyword or identifier.
1.589 node_modules/fastify/types/instance.d.ts(366,14): error TS1128: Declaration or statement expected.
1.589 node_modules/fastify/types/instance.d.ts(366,35): error TS1005: ':' expected.
1.589 node_modules/fastify/types/instance.d.ts(366,318): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(367,3): error TS1109: Expression expected.
1.589 node_modules/fastify/types/instance.d.ts(367,4): error TS1128: Declaration or statement expected.
1.589 node_modules/fastify/types/instance.d.ts(376,18): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(378,20): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(379,12): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(380,8): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(380,289): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(381,3): error TS1109: Expression expected.
1.589 node_modules/fastify/types/instance.d.ts(382,9): error TS1005: ')' expected.
1.589 node_modules/fastify/types/instance.d.ts(383,9): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(383,11): error TS1434: Unexpected keyword or identifier.
1.589 node_modules/fastify/types/instance.d.ts(383,14): error TS1128: Declaration or statement expected.
1.589 node_modules/fastify/types/instance.d.ts(383,35): error TS1005: ':' expected.
1.589 node_modules/fastify/types/instance.d.ts(383,332): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(384,3): error TS1109: Expression expected.
1.589 node_modules/fastify/types/instance.d.ts(384,4): error TS1128: Declaration or statement expected.
1.589 node_modules/fastify/types/instance.d.ts(392,18): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(394,20): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(395,12): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(397,9): error TS1005: ')' expected.
1.589 node_modules/fastify/types/instance.d.ts(398,9): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(399,3): error TS1128: Declaration or statement expected.
1.589 node_modules/fastify/types/instance.d.ts(399,4): error TS1128: Declaration or statement expected.
1.589 node_modules/fastify/types/instance.d.ts(407,9): error TS1005: ',' expected.
1.589 node_modules/fastify/types/instance.d.ts(408,9): error TS1005: ',' expected.
1.589 node_modules/fastify/types/instance.d.ts(409,4): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(415,8): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(415,61): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(417,9): error TS1005: ')' expected.
1.589 node_modules/fastify/types/instance.d.ts(418,9): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(418,11): error TS1434: Unexpected keyword or identifier.
1.589 node_modules/fastify/types/instance.d.ts(418,14): error TS1128: Declaration or statement expected.
1.589 node_modules/fastify/types/instance.d.ts(418,35): error TS1005: ':' expected.
1.589 node_modules/fastify/types/instance.d.ts(418,104): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(419,3): error TS1109: Expression expected.
1.589 node_modules/fastify/types/instance.d.ts(419,4): error TS1128: Declaration or statement expected.
1.589 node_modules/fastify/types/instance.d.ts(425,8): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(425,173): error TS1005: ';' expected.
1.589 node_modules/fastify/types/instance.d.ts(426,3): error TS1109: Expression expected.
1.590 node_modules/fastify/types/instance.d.ts(427,9): error TS1005: ')' expected.
1.590 node_modules/fastify/types/instance.d.ts(428,9): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(428,11): error TS1434: Unexpected keyword or identifier.
1.590 node_modules/fastify/types/instance.d.ts(428,14): error TS1128: Declaration or statement expected.
1.590 node_modules/fastify/types/instance.d.ts(428,35): error TS1005: ':' expected.
1.590 node_modules/fastify/types/instance.d.ts(428,106): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(429,3): error TS1109: Expression expected.
1.590 node_modules/fastify/types/instance.d.ts(429,4): error TS1128: Declaration or statement expected.
1.590 node_modules/fastify/types/instance.d.ts(435,8): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(435,61): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(437,9): error TS1005: ')' expected.
1.590 node_modules/fastify/types/instance.d.ts(438,9): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(438,11): error TS1434: Unexpected keyword or identifier.
1.590 node_modules/fastify/types/instance.d.ts(438,14): error TS1128: Declaration or statement expected.
1.590 node_modules/fastify/types/instance.d.ts(438,35): error TS1005: ':' expected.
1.590 node_modules/fastify/types/instance.d.ts(438,104): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(439,3): error TS1109: Expression expected.
1.590 node_modules/fastify/types/instance.d.ts(439,4): error TS1128: Declaration or statement expected.
1.590 node_modules/fastify/types/instance.d.ts(445,8): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(445,63): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(447,9): error TS1005: ')' expected.
1.590 node_modules/fastify/types/instance.d.ts(448,9): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(448,11): error TS1434: Unexpected keyword or identifier.
1.590 node_modules/fastify/types/instance.d.ts(448,14): error TS1128: Declaration or statement expected.
1.590 node_modules/fastify/types/instance.d.ts(448,35): error TS1005: ':' expected.
1.590 node_modules/fastify/types/instance.d.ts(448,106): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(449,3): error TS1109: Expression expected.
1.590 node_modules/fastify/types/instance.d.ts(449,4): error TS1128: Declaration or statement expected.
1.590 node_modules/fastify/types/instance.d.ts(452,46): error TS1005: '?' expected.
1.590 node_modules/fastify/types/instance.d.ts(454,3): error TS1005: '?' expected.
1.590 node_modules/fastify/types/instance.d.ts(455,9): error TS1005: ',' expected.
1.590 node_modules/fastify/types/instance.d.ts(456,9): error TS1005: ',' expected.
1.590 node_modules/fastify/types/instance.d.ts(456,14): error TS1005: ',' expected.
1.590 node_modules/fastify/types/instance.d.ts(456,35): error TS1005: ':' expected.
1.590 node_modules/fastify/types/instance.d.ts(456,94): error TS1005: ',' expected.
1.590 node_modules/fastify/types/instance.d.ts(457,4): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(462,35): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(462,104): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(462,170): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(462,243): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(463,12): error TS1005: ')' expected.
1.590 node_modules/fastify/types/instance.d.ts(464,3): error TS1128: Declaration or statement expected.
1.590 node_modules/fastify/types/instance.d.ts(464,4): error TS1128: Declaration or statement expected.
1.590 node_modules/fastify/types/instance.d.ts(466,35): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(466,104): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(466,170): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(466,243): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(467,9): error TS1005: ')' expected.
1.590 node_modules/fastify/types/instance.d.ts(468,21): error TS1109: Expression expected.
1.590 node_modules/fastify/types/instance.d.ts(469,18): error TS1109: Expression expected.
1.590 node_modules/fastify/types/instance.d.ts(470,6): error TS1128: Declaration or statement expected.
1.590 node_modules/fastify/types/instance.d.ts(472,3): error TS1128: Declaration or statement expected.
1.590 node_modules/fastify/types/instance.d.ts(472,4): error TS1128: Declaration or statement expected.
1.590 node_modules/fastify/types/instance.d.ts(477,92): error TS1109: Expression expected.
1.590 node_modules/fastify/types/instance.d.ts(482,26): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(482,69): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(482,139): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(482,191): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(483,12): error TS1005: ')' expected.
1.590 node_modules/fastify/types/instance.d.ts(484,3): error TS1128: Declaration or statement expected.
1.590 node_modules/fastify/types/instance.d.ts(484,4): error TS1128: Declaration or statement expected.
1.590 node_modules/fastify/types/instance.d.ts(489,17): error TS1005: ',' expected.
1.590 node_modules/fastify/types/instance.d.ts(489,75): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(515,32): error TS1005: ',' expected.
1.590 node_modules/fastify/types/instance.d.ts(515,115): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(525,26): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(525,57): error TS1005: ')' expected.
1.590 node_modules/fastify/types/instance.d.ts(525,83): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(525,84): error TS1128: Declaration or statement expected.
1.590 node_modules/fastify/types/instance.d.ts(535,27): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(535,58): error TS1005: ')' expected.
1.590 node_modules/fastify/types/instance.d.ts(535,88): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(535,89): error TS1128: Declaration or statement expected.
1.590 node_modules/fastify/types/instance.d.ts(540,43): error TS1005: ',' expected.
1.590 node_modules/fastify/types/instance.d.ts(540,76): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(545,37): error TS1005: ',' expected.
1.590 node_modules/fastify/types/instance.d.ts(545,88): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(550,41): error TS1005: ',' expected.
1.590 node_modules/fastify/types/instance.d.ts(550,64): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(576,20): error TS1109: Expression expected.
1.590 node_modules/fastify/types/instance.d.ts(576,41): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(581,17): error TS1005: ';' expected.
1.590 node_modules/fastify/types/instance.d.ts(607,1): error TS1128: Declaration or statement expected.
1.590 node_modules/fastify/types/route.d.ts(135,110): error TS1139: Type parameter declaration expected.
1.590 node_modules/fastify/types/route.d.ts(135,131): error TS1005: ',' expected.
1.590 node_modules/fastify/types/route.d.ts(136,9): error TS1005: ')' expected.
1.590 node_modules/fastify/types/route.d.ts(139,3): error TS1128: Declaration or statement expected.
1.590 node_modules/fastify/types/route.d.ts(139,4): error TS1128: Declaration or statement expected.
1.590 node_modules/fastify/types/route.d.ts(140,47): error TS1005: '?' expected.
1.590 node_modules/fastify/types/route.d.ts(140,110): error TS1109: Expression expected.
1.590 node_modules/fastify/types/route.d.ts(140,131): error TS1005: ',' expected.
1.591 node_modules/fastify/types/route.d.ts(141,9): error TS1005: ')' expected.
1.591 node_modules/fastify/types/route.d.ts(143,3): error TS1128: Declaration or statement expected.
1.591 node_modules/fastify/types/route.d.ts(143,4): error TS1128: Declaration or statement expected.
1.591 node_modules/fastify/types/route.d.ts(144,47): error TS1005: '?' expected.
1.591 node_modules/fastify/types/route.d.ts(144,110): error TS1109: Expression expected.
1.591 node_modules/fastify/types/route.d.ts(144,131): error TS1005: ',' expected.
1.591 node_modules/fastify/types/route.d.ts(145,9): error TS1005: ')' expected.
1.591 node_modules/fastify/types/route.d.ts(147,3): error TS1128: Declaration or statement expected.
1.591 node_modules/fastify/types/route.d.ts(147,4): error TS1128: Declaration or statement expected.
1.591 node_modules/fastify/types/route.d.ts(148,1): error TS1128: Declaration or statement expected.

Steps to Reproduce

All I had to do was update my fastify version from 3.x to 4.x and run ‘tsc’

Expected Behavior

No errors and tsc succeeds

We are not supporting unreasonable old typescript versions.

I do not expect you to support the 3.x version!

but I would expect 4.x to be compatible with typescript and tsc given that the current docs have a whole section on using fastify with typescript.

Your first wrong assumption is that typescript would be using semver. It is not. Every typescript minor version is breaking the previous minor version.

https://www.learningtypescript.com/articles/why-typescript-doesnt-follow-strict-semantic-versioning#typescript-versioning-today

You could basically say, that version 4.0 is actually semver version 40. current version 5.3 is actually semver version 53.

So if you are using typescript 4.0 you are 13 semver major versions - or more than 3 years - behind latest typescript version.

Upgrade your typescript version.

Ok, I will attempt to update Typescript. But given the nearly global acceptance of Semver, it was a reasonable assumption for me as a newbie to both fastify and typescript.

Ok, I will attempt to update Typescript. But given the nearly global acceptance of Semver, it was a reasonable assumption for me as a newbie to both fastify and typescript.

Agreed. You should make that known to the TS project. (Foreshadowing: they won't care.)

Upgrading typescript did the trick. Thank you.

Closing this issue