Skip to content

Commit

Permalink
fix: fixed default value type. now can be string or null
Browse files Browse the repository at this point in the history
  • Loading branch information
raisiqueira committed Jan 30, 2022
1 parent c091c7f commit 23bd546
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type UseViaCepHook = {
loading: boolean;
};

const useViaCep = (value: string | number = ''): UseViaCepHook => {
const useViaCep = (value: string | null = ''): UseViaCepHook => {
const [cep, setCep] = useState<ViaCepResponse>({} as ViaCepResponse);
const [error, setError] = useState<null | string>(null);
const [loading, setLoading] = useState<boolean>(false);
Expand Down

0 comments on commit 23bd546

Please sign in to comment.