Skip to content

Commit

Permalink
allowing default of <any> generic type for defining a schema to preve…
Browse files Browse the repository at this point in the history
…nt type errors
  • Loading branch information
lostpebble committed Aug 7, 2017
1 parent 3f34e2d commit d48b512
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/PebbleBed.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export declare type SchemaDefinitionProperties<T> = {
export declare type SchemaDefinitionOptions = {
__excludeFromIndexes?: string[];
};
export declare type SchemaDefinition<T> = SchemaDefinitionProperties<T> & SchemaDefinitionOptions;
export declare type SchemaDefinition<T = any> = SchemaDefinitionProperties<T> & SchemaDefinitionOptions;
export declare type SchemaPropertyDefinition = {
type: "string" | "int" | "double" | "boolean" | "datetime" | "array" | "object" | "geoPoint";
required?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/Pebblebed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ErrorMessages } from "./ErrorMessages";
export type SchemaDefinitionProperties<T> = { [P in keyof T]: SchemaPropertyDefinition };
export type SchemaDefinitionOptions = { __excludeFromIndexes?: string[] };

export type SchemaDefinition<T> = SchemaDefinitionProperties<T> & SchemaDefinitionOptions;
export type SchemaDefinition<T = any> = SchemaDefinitionProperties<T> & SchemaDefinitionOptions;

export type SchemaPropertyDefinition = {
type: "string" | "int" | "double" | "boolean" | "datetime" | "array" | "object" | "geoPoint";
Expand Down

0 comments on commit d48b512

Please sign in to comment.