From fd523e3033e541ab2926c9275058189b8057cc95 Mon Sep 17 00:00:00 2001 From: Peter Blazejewicz Date: Thu, 4 Jan 2018 22:01:27 +0100 Subject: [PATCH] Replace Lusca definition file with @types/lusca Thanks! --- README.md | 4 ++-- package.json | 1 + src/types/lusca.d.ts | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 src/types/lusca.d.ts diff --git a/README.md b/README.md index 2ae386f..6f9afc4 100644 --- a/README.md +++ b/README.md @@ -197,9 +197,9 @@ In the `tsconfig.json` for this project you'll see the following: This tells the TypeScript compiler that in addition to looking in `node_modules/@types` for every import (`*`) also look in our own `.d.ts` file location `` + `src/types/*`. So when we write something like: ```ts -import * as lusca from "lusca"; +import * as flash from "express-flash"; ``` -First the compiler will look for a `d.ts` file in `node_modules/@types` and then when it doesn't find one look in `src/types` and find our file `lusca.d.ts`. +First the compiler will look for a `d.ts` file in `node_modules/@types` and then when it doesn't find one look in `src/types` and find our file `express-flash.d.ts`. #### Using `dts-gen` Unless you are familiar with `.d.ts` files, I strongly recommend trying to use the tool [dts-gen](https://github.com/Microsoft/dts-gen) first. diff --git a/package.json b/package.json index fa108a4..8dea84e 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,7 @@ "@types/jest": "^21.1.8", "@types/jquery": "^3.2.17", "@types/lodash": "^4.14.91", + "@types/lusca": "^1.5.0", "@types/mongodb": "^2.2.17", "@types/mongoose": "^4.7.29", "@types/morgan": "^1.7.32", diff --git a/src/types/lusca.d.ts b/src/types/lusca.d.ts deleted file mode 100644 index c4da8b8..0000000 --- a/src/types/lusca.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function xframe(type: string): any; -export function xssProtection(enabled: boolean): any;