Daily Archive: November 10th, 2017

VSCode 代码提示

提示文件搜索

Jquery代码提示

rem 进入项目目录执行
npm init -y
npm install --save @types/jquery

引入方式1. 手动引入提示文件

/// <reference path="./node_modules/@types/jquery/index.d.ts" />
$dp.$D('#date091873-')
$dp.$D('date083588-')

引入方式2. 配置文件引入

{
  "name": "code",
  "version": "1.0.0",
  "description": "",
  "main": "Untitled-1.js",
  "dependencies": {
    "@types/jquery": "^3.2.16"
  },
  "devDependencies": {},
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "types": "./node_modules/@types/jquery/index.d.ts"
}