-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
5,149 additions
and
4,877 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
[ignore] | ||
.*/node_modules/.* | ||
./packages/generator-super | ||
.*\.flow | ||
|
||
[include] | ||
./packages/.*/src/lib/.*\.js | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3667,7 +3667,7 @@ | |
return Trie; | ||
}(); | ||
|
||
var version = "0.0.3"; | ||
var version = "0.0.4"; | ||
|
||
var Super = { | ||
version: version, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,200 @@ | ||
declare export class Array extends Array<any> { | ||
|
||
constructor (iterable?: Array<any>): void; | ||
flatMap (callback: (value: any, index: number, array: Array<any>) => Array<any>): Array<any>; | ||
flatten (depth?: number): Array<any>; | ||
mergeSort (comparator: any): Array<any>; | ||
} | ||
|
||
declare export class BinaryTree { | ||
|
||
_root: ?BinaryTreeNode; | ||
get height (): number; | ||
get root (): ?BinaryTreeNode; | ||
constructor (iterable?: Array<number>): void; | ||
findMax (node?: ?BinaryTreeNode): ?BinaryTreeNode; | ||
findMin (node?: ?BinaryTreeNode): ?BinaryTreeNode; | ||
getHeight (node?: ?BinaryTreeNode): number; | ||
inOrder (node?: ?BinaryTreeNode): Array<BinaryTreeNode>; | ||
insert (value: any): void; | ||
levelOrder (node?: ?BinaryTreeNode): Array<BinaryTreeNode>; | ||
postOrder (node?: ?BinaryTreeNode): Array<BinaryTreeNode>; | ||
preOrder (node?: ?BinaryTreeNode): Array<BinaryTreeNode>; | ||
remove (value: any): void; | ||
search (value: any): ?BinaryTreeNode; | ||
toArray (traversal: $Keys<{ IN_ORDER: string, LEVEL_ORDER: string, POST_ORDER: string, PRE_ORDER: string }>, flatten?: boolean): Array<BinaryTreeNode | any>; | ||
} | ||
|
||
declare export var TraversalType: { IN_ORDER: string, LEVEL_ORDER: string, POST_ORDER: string, PRE_ORDER: string }; | ||
|
||
declare export class BinaryTreeNode { | ||
|
||
_left: ?BinaryTreeNode; | ||
_right: ?BinaryTreeNode; | ||
_value: any; | ||
get left (): ?BinaryTreeNode | ||
set left (value: ?BinaryTreeNode): void; | ||
get right (): ?BinaryTreeNode | ||
set right (value: ?BinaryTreeNode): void; | ||
get value (): any | ||
set value (value: any): void; | ||
constructor (value: any): void; | ||
} | ||
|
||
declare export class LinkedList { | ||
|
||
_head: ?ListNode; | ||
_size: number; | ||
_tail: ?ListNode; | ||
get head (): ?ListNode; | ||
get size (): number; | ||
get tail (): ?ListNode; | ||
append (value: any): number; | ||
constructor (iterable?: Array<any>): void; | ||
insert (position: number, value: any): number; | ||
pop (): any; | ||
prepend (value: any): number; | ||
push (value: any): number; | ||
remove (position: number): any; | ||
shift (): any; | ||
toArray (): Array<any>; | ||
unshift (value: any): number; | ||
} | ||
|
||
declare export class ListNode { | ||
|
||
_next: ?ListNode; | ||
_prev: ?ListNode; | ||
_value: any; | ||
get next (): ?ListNode | ||
set next (value: ?ListNode): void; | ||
get prev (): ?ListNode | ||
set prev (value: ?ListNode): void; | ||
get value (): any | ||
set value (value: any): void; | ||
constructor (item: any): void; | ||
} | ||
|
||
declare export class Map extends Map<any, any> { | ||
|
||
constructor (iterable: Array<any>): any; | ||
every (callback: (value: any, key: any, map: Map<any, any>) => boolean): boolean; | ||
setDefault (key: any, defaultValue: any): any; | ||
some (callback: (value: any, key: any, map: Map<any, any>) => boolean): boolean; | ||
toObject (): any; | ||
} | ||
|
||
declare export var Math: { factorial: (num: number) => number }; | ||
declare export var _Math: { factorial: (num: number) => number }; | ||
|
||
declare export function mergeSort (arr: Array<any>, comparator?: any): Array<any | any>; | ||
|
||
declare export class Number extends Number { | ||
static fromRomanNumeral (str: string): number; | ||
|
||
constructor (number: number): void; | ||
toRomanNumeral (): string; | ||
} | ||
|
||
declare export class Object extends Object { | ||
|
||
clone (config?: { includeNonEnumerable: ?boolean }): Object; | ||
constructor (object: Object): void; | ||
getNested (path: string): any; | ||
hasNested (path: string): boolean; | ||
} | ||
|
||
declare export class PriorityQueue { | ||
static _defaultComparator (a: any, b: any): number | boolean; | ||
static _wrapComparator (comparator: any): any; | ||
|
||
_comparator: any; | ||
_queue: Array<any>; | ||
get high (): any; | ||
get low (): any; | ||
get max (): any; | ||
get min (): any; | ||
get size (): number; | ||
clear (): void; | ||
constructor (iterable?: Map<number, any> | [any] | [[number, any]] | [{ priority: number, value: any }], comparator: any): void; | ||
deleteHigh (): any; | ||
deleteLow (): any; | ||
deleteMax (): any; | ||
deleteMin (): any; | ||
insert (value: any, priority?: number): number; | ||
isEmpty (): boolean; | ||
toArray (): Array<any>; | ||
} | ||
|
||
declare export class QueueNode { | ||
|
||
_priority: number; | ||
_value: any; | ||
get priority (): number; | ||
get value (): any; | ||
constructor (value: any, priority: number): void; | ||
} | ||
|
||
declare export class Queue { | ||
|
||
_queue: Array<any>; | ||
get front (): any; | ||
get rear (): any; | ||
get size (): number; | ||
clear (): void; | ||
constructor (iterable?: Array<any>): void; | ||
dequeue (): any; | ||
enqueue (item: any): number; | ||
isEmpty (): boolean; | ||
toArray (): Array<any>; | ||
} | ||
|
||
declare export class Set extends Set<any> { | ||
|
||
constructor (iterable: Array<any>): void; | ||
difference (setB: Set<any>): Set<any>; | ||
every (callback: (value1: any, value2: any, set: Set<any>) => boolean): boolean; | ||
intersection (setB: Set<any>): Set<any>; | ||
isSubset (setB: Set<any>): boolean; | ||
isSuperset (setB: Set<any>): boolean; | ||
some (callback: (value1: any, value2: any, set: Set<any>) => boolean): boolean; | ||
symmetricDifference (setB: Set<any>): Set<any>; | ||
union (setB: Set<any>): Set<any>; | ||
} | ||
|
||
declare export class String extends String { | ||
|
||
constructor (string: string): void; | ||
reverse (): string; | ||
reverseWords (): string; | ||
toTitleCase (): string; | ||
} | ||
|
||
declare export class Trie { | ||
|
||
_root: TrieNode; | ||
get root (): TrieNode; | ||
constructor (iterable?: Array<string>): void; | ||
contains (word: string): boolean; | ||
includes (word: string): boolean; | ||
insert (word: string): void; | ||
remove (word: string): boolean; | ||
search (query: string): { isCompleteWord: boolean, isMatch: boolean, matchedChars: number, node: ?TrieNode, query: string }; | ||
startsWith (prefix: string): boolean; | ||
} | ||
|
||
declare export class TrieNode { | ||
|
||
_char: any; | ||
_children: Map<any, TrieNode>; | ||
_isCompleteWord: boolean; | ||
get char (): any; | ||
get count (): number; | ||
get isCompleteWord (): boolean; | ||
get isLeafNode (): boolean; | ||
constructor (char?: any): void; | ||
delete (char: any): void; | ||
get (char: any): ?TrieNode; | ||
has (char: any): boolean; | ||
set (char: any, node: TrieNode): void; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.