gpt4 book ai didi

javascript - 为什么我无法编译引用 jquery.d.ts 的文件?

转载 作者:数据小太阳 更新时间:2023-10-29 04:49:33 26 4
gpt4 key购买 nike

<分区>

我的文件“blah.ts”的内容是

///<reference path="jquery.d.ts">

就是这样。

文件“jquery.d.ts”与“blah.ts”处于同一级别。

我从 here 复制并粘贴了 jquery.d.ts

我使用 npm 安装了 typescript,它是 1.3.0.0 版本。

当我运行时

tsc blah.ts

我得到一页错误

query.d.ts(279,40): error TS1005: ',' expected.
jquery.d.ts(279,61): error TS1005: '=' expected.
jquery.d.ts(279,64): error TS1109: Expression expected.
jquery.d.ts(279,97): error TS1005: ',' expected.
jquery.d.ts(279,118): error TS1005: '=' expected.
jquery.d.ts(279,121): error TS1109: Expression expected.
jquery.d.ts(342,40): error TS1005: ',' expected.
jquery.d.ts(342,61): error TS1005: '=' expected.
jquery.d.ts(342,64): error TS1109: Expression expected.
jquery.d.ts(342,103): error TS1005: ',' expected.
jquery.d.ts(342,124): error TS1005: '=' expected.
jquery.d.ts(342,127): error TS1109: Expression expected.
jquery.d.ts(352,48): error TS1005: ',' expected.
jquery.d.ts(352,69): error TS1005: '=' expected.
jquery.d.ts(352,72): error TS1109: Expression expected.
jquery.d.ts(352,111): error TS1005: ',' expected.
jquery.d.ts(352,132): error TS1005: '=' expected.
jquery.d.ts(352,135): error TS1109: Expression expected.
jquery.d.ts(677,35): error TS1005: ',' expected.
jquery.d.ts(677,36): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(692,39): error TS1005: ',' expected.
jquery.d.ts(692,40): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(722,36): error TS1005: ',' expected.
jquery.d.ts(722,37): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(744,41): error TS1005: ',' expected.
jquery.d.ts(744,42): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(1214,36): error TS1005: ',' expected.
jquery.d.ts(1214,37): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(1255,46): error TS1005: ',' expected.
jquery.d.ts(1311,45): error TS1005: ',' expected.
jquery.d.ts(1311,52): error TS1005: ',' expected.
jquery.d.ts(1383,22): error TS1005: ',' expected.
jquery.d.ts(1383,29): error TS1005: '=' expected.
jquery.d.ts(1404,44): error TS1005: ',' expected.
jquery.d.ts(1411,78): error TS1005: ',' expected.
jquery.d.ts(1428,25): error TS1005: ',' expected.
jquery.d.ts(1434,59): error TS1005: ',' expected.
jquery.d.ts(1446,31): error TS1005: ',' expected.
jquery.d.ts(1458,29): error TS1005: ',' expected.
jquery.d.ts(1489,30): error TS1005: ',' expected.
jquery.d.ts(1503,29): error TS1005: ',' expected.
jquery.d.ts(1541,24): error TS1005: ',' expected.
jquery.d.ts(1547,57): error TS1005: ',' expected.
jquery.d.ts(1615,50): error TS1005: ',' expected.
jquery.d.ts(1615,51): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(1624,50): error TS1005: ',' expected.
jquery.d.ts(1624,51): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(1647,29): error TS1005: ',' expected.
jquery.d.ts(1647,30): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(1655,29): error TS1005: ',' expected.
jquery.d.ts(1655,30): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(1669,30): error TS1005: ',' expected.
jquery.d.ts(1669,31): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(1677,30): error TS1005: ',' expected.
jquery.d.ts(1677,31): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(1692,28): error TS1005: ',' expected.
jquery.d.ts(1701,28): error TS1005: ',' expected.
jquery.d.ts(1709,33): error TS1005: ',' expected.
jquery.d.ts(1709,34): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(1717,33): error TS1005: ',' expected.
jquery.d.ts(1717,34): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(1738,27): error TS1005: ',' expected.
jquery.d.ts(1738,28): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(1746,27): error TS1005: ',' expected.
jquery.d.ts(1746,28): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(1760,27): error TS1005: ',' expected.
jquery.d.ts(1760,28): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(1768,27): error TS1005: ',' expected.
jquery.d.ts(1768,28): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(1782,32): error TS1005: ',' expected.
jquery.d.ts(1782,33): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(1790,32): error TS1005: ',' expected.
jquery.d.ts(1790,33): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(1804,34): error TS1005: ',' expected.
jquery.d.ts(1804,35): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(1812,34): error TS1005: ',' expected.
jquery.d.ts(1812,35): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(1826,30): error TS1005: ',' expected.
jquery.d.ts(1826,31): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(1834,30): error TS1005: ',' expected.
jquery.d.ts(1834,31): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(1864,29): error TS1005: ',' expected.
jquery.d.ts(1864,30): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(1872,29): error TS1005: ',' expected.
jquery.d.ts(1872,30): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(2464,55): error TS1005: ',' expected.
jquery.d.ts(2464,56): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(2471,62): error TS1005: ',' expected.
jquery.d.ts(2471,63): error TS1016: A required parameter cannot follow an optional parameter.
jquery.d.ts(2584,27): error TS1005: ',' expected.
jquery.d.ts(2584,31): error TS1005: '=' expected.
jquery.d.ts(2598,28): error TS1005: ',' expected.
jquery.d.ts(2598,32): error TS1005: '=' expected.
jquery.d.ts(2611,28): error TS1005: ',' expected.
jquery.d.ts(2611,32): error TS1005: '=' expected.
jquery.d.ts(2619,28): error TS1005: ',' expected.
jquery.d.ts(2619,32): error TS1005: '=' expected.
jquery.d.ts(2652,31): error TS1005: ',' expected.
jquery.d.ts(2652,35): error TS1005: '=' expected.
jquery.d.ts(2659,32): error TS1005: ',' expected.
jquery.d.ts(2659,36): error TS1005: '=' expected.
jquery.d.ts(2667,29): error TS1005: ',' expected.
jquery.d.ts(2667,33): error TS1005: '=' expected.
jquery.d.ts(2680,29): error TS1005: ',' expected.
jquery.d.ts(2680,33): error TS1005: '=' expected.
jquery.d.ts(2694,30): error TS1005: ',' expected.
jquery.d.ts(2694,34): error TS1005: '=' expected.
jquery.d.ts(2701,35): error TS1005: ',' expected.
jquery.d.ts(2701,39): error TS1005: '=' expected.
jquery.d.ts(2718,22): error TS1005: ',' expected.
jquery.d.ts(2718,29): error TS1005: ',' expected.
jquery.d.ts(2741,33): error TS1005: ',' expected.
jquery.d.ts(2741,41): error TS1005: ',' expected.
jquery.d.ts(2754,36): error TS1005: ',' expected.
jquery.d.ts(2754,44): error TS1005: ',' expected.
jquery.d.ts(2761,38): error TS1005: ',' expected.
jquery.d.ts(2761,46): error TS1005: ',' expected.
jquery.d.ts(2796,27): error TS1005: ',' expected.
jquery.d.ts(2796,34): error TS1005: ',' expected.

如果我不包括 jquery,它编译得很好(我完成了教程并且它有效)。这里出了什么问题?

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com