mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
Add noImplicitAny to tsc compiler options (#86)
This commit is contained in:
@@ -168,7 +168,8 @@ describe('Lastpass CSV Importer', () => {
|
|||||||
expect(result.ciphers.length).toBeGreaterThan(0);
|
expect(result.ciphers.length).toBeGreaterThan(0);
|
||||||
|
|
||||||
const cipher = result.ciphers.shift();
|
const cipher = result.ciphers.shift();
|
||||||
for (const property in data.expected) {
|
let property: keyof typeof data.expected;
|
||||||
|
for (property in data.expected) {
|
||||||
if (data.expected.hasOwnProperty(property)) {
|
if (data.expected.hasOwnProperty(property)) {
|
||||||
expect(cipher.hasOwnProperty(property)).toBe(true);
|
expect(cipher.hasOwnProperty(property)).toBe(true);
|
||||||
expect(cipher[property]).toEqual(data.expected[property]);
|
expect(cipher[property]).toEqual(data.expected[property]);
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ describe('sequentialize decorator', () => {
|
|||||||
|
|
||||||
it('should return correct result for each call', async () => {
|
it('should return correct result for each call', async () => {
|
||||||
const foo = new Foo();
|
const foo = new Foo();
|
||||||
const allRes = [];
|
const allRes: number[] = [];
|
||||||
|
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
foo.bar(1).then((res) => allRes.push(res)),
|
foo.bar(1).then((res) => allRes.push(res)),
|
||||||
@@ -99,7 +99,7 @@ describe('sequentialize decorator', () => {
|
|||||||
|
|
||||||
it('should return correct result for each call with key function', async () => {
|
it('should return correct result for each call with key function', async () => {
|
||||||
const foo = new Foo();
|
const foo = new Foo();
|
||||||
const allRes = [];
|
const allRes: number[] = [];
|
||||||
|
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
foo.baz(1).then((res) => allRes.push(res)),
|
foo.baz(1).then((res) => allRes.push(res)),
|
||||||
@@ -120,7 +120,7 @@ class Foo {
|
|||||||
calls = 0;
|
calls = 0;
|
||||||
|
|
||||||
@sequentialize((args) => 'bar' + args[0])
|
@sequentialize((args) => 'bar' + args[0])
|
||||||
bar(a: number) {
|
bar(a: number): Promise<number> {
|
||||||
this.calls++;
|
this.calls++;
|
||||||
return new Promise((res) => {
|
return new Promise((res) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -130,7 +130,7 @@ class Foo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@sequentialize((args) => 'baz' + args[0])
|
@sequentialize((args) => 'baz' + args[0])
|
||||||
baz(a: number) {
|
baz(a: number): Promise<number> {
|
||||||
this.calls++;
|
this.calls++;
|
||||||
return new Promise((res) => {
|
return new Promise((res) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"pretty": true,
|
"pretty": true,
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
|
"noImplicitAny": true,
|
||||||
"target": "ES6",
|
"target": "ES6",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"lib": ["es5", "es6", "dom"],
|
"lib": ["es5", "es6", "dom"],
|
||||||
|
|||||||
Reference in New Issue
Block a user