Skip to content

Commit

Permalink
fix: update return types for parsers
Browse files Browse the repository at this point in the history
make type a bit more predictable

if you think this is not the right type a recommendation would be to use Record<string, unknown>
  • Loading branch information
lifeiscontent authored and dhensby committed Aug 1, 2023
1 parent 4688a37 commit bb6393a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser/sql-connection-string.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ function validate(value: string | number | boolean, allowedValues?: (string | nu
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
export default function parseSqlConnectionString(connectionString: string, canonicalProps = false, allowUnknown = false, strict = false, schema: SchemaDefinition = SCHEMA) {
export default function parseSqlConnectionString(connectionString: string, canonicalProps = false, allowUnknown = false, strict = false, schema: SchemaDefinition = SCHEMA): Record<string, string | number | boolean> {
const flattenedSchema = Object.entries(schema).reduce((flattened: SchemaDefinition, [key, item]) => {
Object.assign(flattened, {
[key.toLowerCase()]: item,
Expand Down

0 comments on commit bb6393a

Please sign in to comment.