Skip to content

Commit

Permalink
feat(types): adapt to 6.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
EdJoPaTo committed Mar 19, 2019
1 parent 993c27c commit d52f6b8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ declare module 'wikidata-sdk' {
export type Format = 'xml' | 'json';
export type SearchType = 'item' | 'property' | 'lexeme' | 'form' | 'sense'

export type SparQLValueRaw = string | number
export type SparQLValueType = SparQLValueRaw | {[key: string]: SparQLValueRaw}

interface Dictionary<T> {
[key: string]: T;
}
Expand Down Expand Up @@ -144,6 +147,7 @@ declare module 'wikidata-sdk' {
export namespace simplify {
export function entity(entity: Entity, options: any = {}): EntitySimplified;
export function entities(entities: Dictionary<Entity>, options: any = {}): Dictionary<EntitySimplified>;
export function sparqlResults(results: SparQLResults): any[];
export function sparqlResults(results: SparQLResults, options: {minimize?: false} = {}): {[key: string]: SparQLValueType}[];
export function sparqlResults(results: SparQLResults, options: {minimize: true}): SparQLValueRaw[];
}
}

0 comments on commit d52f6b8

Please sign in to comment.