Skip to content

Commit

Permalink
refactor: revert tsconfig strict mode
Browse files Browse the repository at this point in the history
  • Loading branch information
alarm109 committed Feb 14, 2023
1 parent 87f8e62 commit 6156fb7
Show file tree
Hide file tree
Showing 19 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/api/healthKit/authorize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const { RNHealthTracker } = NativeModules;
export const authorize = async (
shareTypes: HealthKitDataType[],
readTypes: HealthKitDataType[],
): Promise<boolean | undefined> => {
): Promise<boolean> => {
if (isIOS) {
const authorized = await RNHealthTracker.authorize(shareTypes, readTypes);

Expand Down
2 changes: 1 addition & 1 deletion src/api/healthKit/deleteRecord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const deleteRecord = async (options: {
uuid?: string;
startDate?: Date | number;
endDate?: Date | number;
}): Promise<number | undefined> => {
}): Promise<number> => {
if (isIOS) {
const startDate = options.startDate ? +options.startDate : 0;
const endDate = options.endDate ? +options.endDate : 0;
Expand Down
2 changes: 1 addition & 1 deletion src/api/healthKit/getAbsoluteTotalForToday.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const { RNHealthTracker } = NativeModules;
export const getAbsoluteTotalForToday = async (options: {
key: HealthKitDataType;
unit: HealthKitUnitType;
}): Promise<number | undefined> => {
}): Promise<number> => {
if (isIOS) {
const { key, unit } = options;
const total = await RNHealthTracker.getAbsoluteTotalForToday(key, unit);
Expand Down
2 changes: 1 addition & 1 deletion src/api/healthKit/getAuthStatusForType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const { RNHealthTracker } = NativeModules;
*/
export const getAuthStatusForType = async (
key: HealthKitDataType,
): Promise<HealthKitAuthStatus | undefined> => {
): Promise<HealthKitAuthStatus> => {
if (isIOS) {
return RNHealthTracker.getAuthorizationStatusForType(key);
}
Expand Down
2 changes: 1 addition & 1 deletion src/api/healthKit/getLatestDataRecord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const { RNHealthTracker } = NativeModules;
export const getLatestDataRecord = async (options: {
key: HealthKitDataType;
unit: HealthKitUnitType;
}): Promise<HealthDataRecord | undefined> => {
}): Promise<HealthDataRecord> => {
if (isIOS) {
const { key, unit } = options;

Expand Down
2 changes: 1 addition & 1 deletion src/api/healthKit/getReadStatusForType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const { RNHealthTracker } = NativeModules;
export const getReadStatusForType = async (options: {
key: HealthKitDataType;
unit: HealthKitUnitType;
}): Promise<HealthKitAuthStatus | undefined> => {
}): Promise<HealthKitAuthStatus> => {
if (isIOS) {
const { key, unit } = options;

Expand Down
2 changes: 1 addition & 1 deletion src/api/healthKit/getStatisticTotalForToday.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const { RNHealthTracker } = NativeModules;
export const getStatisticTotalForToday = async (options: {
key: HealthKitDataType;
unit: HealthKitUnitType;
}): Promise<number | undefined> => {
}): Promise<number> => {
if (isIOS) {
const { key, unit } = options;
const total = await RNHealthTracker.getStatisticTotalForToday(key, unit);
Expand Down
2 changes: 1 addition & 1 deletion src/api/healthKit/getStatisticTotalForWeek.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const { RNHealthTracker } = NativeModules;
export const getStatisticTotalForWeek = async (options: {
key: HealthKitDataType;
unit: HealthKitUnitType;
}): Promise<number | undefined> => {
}): Promise<number> => {
if (isIOS) {
const { key, unit } = options;
const total = await RNHealthTracker.getStatisticTotalForWeek(key, unit);
Expand Down
2 changes: 1 addition & 1 deletion src/api/healthKit/getStatisticWeekDaily.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const { RNHealthTracker } = NativeModules;
export const getStatisticWeekDaily = async (options: {
key: HealthKitDataType;
unit: HealthKitUnitType;
}): Promise<DailyData | undefined> => {
}): Promise<DailyData> => {
if (isIOS) {
const { key, unit } = options;

Expand Down
2 changes: 1 addition & 1 deletion src/api/healthKit/isHealthDataAvailable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const { RNHealthTracker } = NativeModules;
*
* @return Returns true if HealthKit is available; otherwise, false.
*/
export const isHealthDataAvailable = async (): Promise<boolean | undefined> => {
export const isHealthDataAvailable = async (): Promise<boolean> => {
if (isIOS) {
const response = await RNHealthTracker.isHealthDataAvailable();

Expand Down
2 changes: 1 addition & 1 deletion src/api/healthKit/queryDailyTotals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const queryDailyTotals = async (options: {
unit: HealthKitUnitType;
startDate: Date | number;
endDate: Date | number;
}): Promise<{ [date: string]: number } | undefined> => {
}): Promise<{ [date: string]: number }> => {
if (isIOS) {
const { key, unit, startDate, endDate } = options;

Expand Down
2 changes: 1 addition & 1 deletion src/api/healthKit/queryDataRecords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const queryDataRecords = async (options: {
unit: HealthKitUnitType;
startDate: Date | number;
endDate: Date | number;
}): Promise<HealthDataRecordQuery | undefined> => {
}): Promise<HealthDataRecordQuery> => {
if (isIOS) {
const { key, unit, startDate, endDate } = options;

Expand Down
2 changes: 1 addition & 1 deletion src/api/healthKit/queryTotal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const queryTotal = async (options: {
unit: HealthKitUnitType;
startDate: Date | number;
endDate: Date | number;
}): Promise<{ [date: string]: number } | undefined> => {
}): Promise<{ [date: string]: number }> => {
if (isIOS) {
const { key, unit, startDate, endDate } = options;

Expand Down
2 changes: 1 addition & 1 deletion src/api/healthKit/queryWorkouts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const queryWorkouts = async (options: {
startDate: Date | number;
endDate: Date | number;
key?: HealthKitWorkoutType;
}): Promise<HealthWorkoutRecordQuery | undefined> => {
}): Promise<HealthWorkoutRecordQuery> => {
if (isIOS) {
const { startDate, endDate, key = 0 } = options;

Expand Down
2 changes: 1 addition & 1 deletion src/api/healthKit/writeBloodPressure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const writeBloodPressure = async (options: {
startDate: Date | number;
endDate: Date | number;
metadata?: HealthKitMetadata;
}): Promise<boolean | undefined> => {
}): Promise<boolean> => {
if (isIOS) {
const {
systolicPressure,
Expand Down
2 changes: 1 addition & 1 deletion src/api/healthKit/writeData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const writeData = async (options: {
amount: number;
metadata?: HealthKitMetadata;
timestamp?: number;
}): Promise<boolean | undefined> => {
}): Promise<boolean> => {
if (isIOS) {
const { key, unit, amount, metadata = {}, timestamp = -1 } = options;

Expand Down
2 changes: 1 addition & 1 deletion src/api/healthKit/writeDataArray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const { RNHealthTracker } = NativeModules;
*/
export const writeDataArray = async (
dataArray: Array<HealthKitWriteData>,
): Promise<boolean | undefined> => {
): Promise<boolean> => {
if (isIOS) {
return RNHealthTracker.writeDataArray(dataArray);
}
Expand Down
2 changes: 1 addition & 1 deletion src/api/healthKit/writeWorkout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const writeWorkout = async (options: {
energyBurned?: number;
totalDistance?: number;
metadata?: HealthKitMetadata;
}): Promise<boolean | undefined> => {
}): Promise<boolean> => {
if (isIOS) {
const {
key,
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"strict": false,
"target": "es2020"
},
"include": ["src/**/*"],
Expand Down

0 comments on commit 6156fb7

Please sign in to comment.