Skip to content

Commit 5cf5db4

Browse files
authored
Rename type to types (#349)
* Rename type to types * Update object key in comment
1 parent 7969a16 commit 5cf5db4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/table.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -618,8 +618,8 @@ export function __table(source, operations) {
618618
}
619619
// Combine column types from schema with user-selected types in operations
620620
const types = new Map(schema.map(({name, type}) => [name, type]));
621-
if (operations.type) {
622-
for (const {name, type} of operations.type) {
621+
if (operations.types) {
622+
for (const {name, type} of operations.types) {
623623
types.set(name, type);
624624
// update schema with user-selected type
625625
if (schema === input.schema) schema = schema.slice(); // copy on write
@@ -629,7 +629,7 @@ export function __table(source, operations) {
629629
source = source.map(d => coerceRow(d, types, schema));
630630
} else if (inferredSchema) {
631631
// Coerce data according to new schema, unless that happened due to
632-
// operations.type, above.
632+
// operations.types, above.
633633
source = source.map(d => coerceRow(d, types, schema));
634634
}
635635
for (const {type, operands} of operations.filter) {

0 commit comments

Comments
 (0)