Skip to content

Commit

Permalink
declared Grouping as global
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickroberts committed Oct 20, 2018
1 parent 2ed1ba4 commit 540ec9e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "enumerable-ts",
"version": "0.0.4-beta",
"version": "0.0.5-beta",
"description": "A port of System.Linq.Enumerable from the .NET framework to TypeScript",
"directories": {
"doc": "docs",
Expand Down
16 changes: 12 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,17 @@ import {
IOrderedGrouping
} from './enumerable'

Object.defineProperty(global, 'Enumerable', {
configurable: true,
writable: true,
value: Enumerable
Object.defineProperties(global, {
Enumerable: {
configurable: true,
writable: true,
value: Enumerable
},
Grouping: {
configurable: true,
writable: true,
value: Grouping
}
})

const TypedArray: TypedArrayConstructor = Object.getPrototypeOf(Uint8Array)
Expand Down Expand Up @@ -48,6 +55,7 @@ export {

declare global {
const Enumerable: EnumerableConstructor
const Grouping: GroupingConstructor

interface Array<T> extends IEnumerable<T> { }
interface Map<K, V> extends IEnumerable<[K, V]> { }
Expand Down

0 comments on commit 540ec9e

Please sign in to comment.