Skip to content

Commit

Permalink
refactor: change parameter type of convertToJson function to unknown …
Browse files Browse the repository at this point in the history
…for better type safety
  • Loading branch information
JeelRajodiya committed Dec 31, 2024
1 parent 72dd6f6 commit 912f64b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import yaml from 'yaml';

function convertToJson(contentYAMLorJSON: string) {
function convertToJson(contentYAMLorJSON: unknown): any {
// Axios handles conversion to JSON by default, if data returned from the server allows it
// So if returned content is not a string (not YAML), we just return JSON back
if (typeof contentYAMLorJSON !== 'string') {
Expand Down

0 comments on commit 912f64b

Please sign in to comment.