Skip to content

Commit d9aff0b

Browse files
committed
Responded to reviewer comments
1 parent bfbf208 commit d9aff0b

File tree

6 files changed

+23
-14
lines changed

6 files changed

+23
-14
lines changed

packages-exp/auth-compat-exp/index.rn.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@
2525
import { AsyncStorage } from 'react-native';
2626
import { ReactNativePersistence } from '@firebase/auth-exp/src/core/persistence/react_native';
2727

28-
const _reactNativeLocalPersistence = new ReactNativePersistence(AsyncStorage);
28+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
29+
const reactNativeLocalPersistence = new ReactNativePersistence(AsyncStorage);

packages-exp/auth-compat-exp/react-native.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727

2828
declare module 'react-native' {
2929
interface ReactNativeAsyncStorage {
30-
setItem(key: string, value: string): Promise<void>
31-
getItem(key: string): Promise<string | null>
32-
removeItem(key: string): Promise<void>
30+
setItem(key: string, value: string): Promise<void>;
31+
getItem(key: string): Promise<string | null>;
32+
removeItem(key: string): Promise<void>;
3333
}
3434
export const AsyncStorage: ReactNativeAsyncStorage;
3535
}

packages-exp/auth-exp/src/core/persistence/react_native.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class FakeAsyncStorage implements ReactNativeAsyncStorage {
3232

3333
async getItem(key: string): Promise<string | null> {
3434
const value = this.storage[key];
35-
return value === undefined ? null : value;
35+
return value ?? null;
3636
}
3737
async removeItem(key: string): Promise<void> {
3838
delete this.storage[key];

packages-exp/auth-exp/src/core/persistence/react_native.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,8 @@ import {ReactNativeAsyncStorage} from '@firebase/auth-types-exp';
2828
*/
2929
export class ReactNativePersistence implements Persistence {
3030
readonly type: PersistenceType = PersistenceType.LOCAL;
31-
private readonly storage: ReactNativeAsyncStorage;
3231

33-
constructor(storage: ReactNativeAsyncStorage) {
34-
this.storage = storage;
35-
}
32+
constructor(private readonly storage: ReactNativeAsyncStorage) {}
3633

3734
async isAvailable(): Promise<boolean> {
3835
try {

packages-exp/auth-types-exp/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818
export interface ReactNativeAsyncStorage {
19-
setItem(key: string, value: string): Promise<void>
20-
getItem(key: string): Promise<string | null>
21-
removeItem(key: string): Promise<void>
19+
setItem(key: string, value: string): Promise<void>;
20+
getItem(key: string): Promise<string | null>;
21+
removeItem(key: string): Promise<void>;
2222
}

yarn.lock

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12590,6 +12590,17 @@ [email protected]:
1259012590
rollup-pluginutils "2.8.1"
1259112591
tslib "1.10.0"
1259212592

12593+
12594+
version "0.26.0"
12595+
resolved "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.26.0.tgz#cee2b44d51d9623686656d76dc30a73c4de91672"
12596+
integrity sha512-lUK7XZVG77tu8dmv1L/0LZFlavED/5Yo6e4iMMl6fdox/yKdj4IFRRPPJEXNdmEaT1nDQQeCi7b5IwKHffMNeg==
12597+
dependencies:
12598+
find-cache-dir "^3.2.0"
12599+
fs-extra "8.1.0"
12600+
resolve "1.15.1"
12601+
rollup-pluginutils "2.8.2"
12602+
tslib "1.10.0"
12603+
1259312604
1259412605
version "0.27.0"
1259512606
resolved "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.27.0.tgz#95ff96f9e07d5000a9d2df4d76b548f9a1f83511"
@@ -12618,7 +12629,7 @@ [email protected]:
1261812629
dependencies:
1261912630
estree-walker "^0.6.1"
1262012631

12621-
rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.6.0, rollup-pluginutils@^2.8.1, rollup-pluginutils@^2.8.2:
12632+
rollup-pluginutils@2.8.2, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.6.0, rollup-pluginutils@^2.8.1, rollup-pluginutils@^2.8.2:
1262212633
version "2.8.2"
1262312634
resolved "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e"
1262412635
integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==
@@ -15536,4 +15547,4 @@ zip-stream@^2.1.2:
1553615547
dependencies:
1553715548
archiver-utils "^2.1.0"
1553815549
compress-commons "^2.1.1"
15539-
readable-stream "^3.4.0"
15550+
readable-stream "^3.4.0"

0 commit comments

Comments
 (0)