Skip to content

Commit

Permalink
Fixed types by removing esModuleInterop (#15)
Browse files Browse the repository at this point in the history
* Fixed the types by removing esModuleInterop

* Adding a release note
  • Loading branch information
kraenhansen authored Feb 28, 2019
1 parent bc025ed commit fa82898
Show file tree
Hide file tree
Showing 30 changed files with 96 additions and 79 deletions.
9 changes: 6 additions & 3 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
[Changes since {PREVIOUS_VERSION}](https://github.com/realm/react-realm-context/compare/{PREVIOUS_VERSION}...{CURRENT_VERSION})

## Enhancements
- None

* None

## Fixed
- None

* Fixed the types by removing the `esModuleInterop` from the tsconfig.json. ([#15](https://github.com/realm/react-realm-context/pull/15), since 0.2.0)

## Internals
- None

* None
9 changes: 6 additions & 3 deletions docs/RELEASENOTES.template.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
[Changes since {PREVIOUS_VERSION}](https://github.com/realm/react-realm-context/compare/{PREVIOUS_VERSION}...{CURRENT_VERSION})

## Enhancements
- None

* None

## Fixed
- None

* None

## Internals
- None

* None
10 changes: 2 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"@octokit/rest": "^16.2.0",
"@types/debug": "^4.1.2",
"@types/fs-extra": "^5.0.2",
"@types/memoize-one": "^4.1.0",
"@types/mocha": "^5.2.0",
"@types/node": "^11.9.5",
"@types/react": "^16.3.14",
Expand Down
19 changes: 19 additions & 0 deletions src/@types/memoize-one/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Type definitions for memoize-one 4.1
// Project: https://github.com/alexreardon/memoize-one#readme
// Definitions by: Karol Majewski <https://github.com/karol-majewski>, Frank Li <https://github.com/franklixuefei>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

declare module 'memoize-one' {
type EqualityFn = (a: any, b: any, index: number) => boolean;

function memoizeOne<T extends (...args: any[]) => any>(
resultFn: T,
isEqual?: EqualityFn,
): T;

namespace memoizeOne {

}

export = memoizeOne;
}
6 changes: 3 additions & 3 deletions src/RealmConnection.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
//
////////////////////////////////////////////////////////////////////////////

import assert, { rejects } from 'assert';
import React from 'react';
import renderer from 'react-test-renderer';
import * as assert from 'assert';
import * as React from 'react';
import * as renderer from 'react-test-renderer';

import { schema } from './test-utils/persons-realm';
import { withROS } from './test-utils/with-ros';
Expand Down
4 changes: 2 additions & 2 deletions src/RealmConnection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
//
////////////////////////////////////////////////////////////////////////////

import React from 'react';
import Realm from 'realm';
import * as React from 'react';
import * as Realm from 'realm';

import { IRealmContext } from '.';

Expand Down
6 changes: 3 additions & 3 deletions src/RealmConsumer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
//
////////////////////////////////////////////////////////////////////////////

import assert from 'assert';
import React from 'react';
import renderer from 'react-test-renderer';
import * as assert from 'assert';
import * as React from 'react';
import * as renderer from 'react-test-renderer';

import { RealmConsumer, RealmProvider } from '.';

Expand Down
2 changes: 1 addition & 1 deletion src/RealmConsumer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//
////////////////////////////////////////////////////////////////////////////

import React from 'react';
import * as React from 'react';

import { IRealmContext } from '.';

Expand Down
6 changes: 3 additions & 3 deletions src/RealmInitializer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
//
////////////////////////////////////////////////////////////////////////////

import assert from 'assert';
import React from 'react';
import renderer from 'react-test-renderer';
import * as assert from 'assert';
import * as React from 'react';
import * as renderer from 'react-test-renderer';

import { IPerson, schema } from './test-utils/persons-realm';

Expand Down
4 changes: 2 additions & 2 deletions src/RealmInitializer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
//
////////////////////////////////////////////////////////////////////////////

import React from 'react';
import Realm from 'realm';
import * as React from 'react';
import * as Realm from 'realm';

import { IRealmContext } from '.';

Expand Down
6 changes: 3 additions & 3 deletions src/RealmProgress.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
//
////////////////////////////////////////////////////////////////////////////

import assert, { rejects } from 'assert';
import React from 'react';
import renderer from 'react-test-renderer';
import * as assert from 'assert';
import * as React from 'react';
import * as renderer from 'react-test-renderer';

import { schema } from './test-utils/persons-realm';
import { withROS } from './test-utils/with-ros';
Expand Down
4 changes: 2 additions & 2 deletions src/RealmProgress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
//
////////////////////////////////////////////////////////////////////////////

import React from 'react';
import Realm from 'realm';
import * as React from 'react';
import * as Realm from 'realm';

import { IRealmContext } from '.';

Expand Down
6 changes: 3 additions & 3 deletions src/RealmProvider.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
//
////////////////////////////////////////////////////////////////////////////

import assert from 'assert';
import React from 'react';
import renderer from 'react-test-renderer';
import * as assert from 'assert';
import * as React from 'react';
import * as renderer from 'react-test-renderer';

import { RealmProvider } from '.';

Expand Down
8 changes: 4 additions & 4 deletions src/RealmProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
//
////////////////////////////////////////////////////////////////////////////

import equal from 'fast-deep-equal';
import memoizeOne from 'memoize-one';
import React from 'react';
import Realm from 'realm';
import * as equal from 'fast-deep-equal';
import * as memoizeOne from 'memoize-one';
import * as React from 'react';
import * as Realm from 'realm';

import { IRealmContext } from '.';

Expand Down
6 changes: 3 additions & 3 deletions src/RealmQuery.1-basic.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
//
////////////////////////////////////////////////////////////////////////////

import assert from 'assert';
import React from 'react';
import renderer from 'react-test-renderer';
import * as assert from 'assert';
import * as React from 'react';
import * as renderer from 'react-test-renderer';

import { IPerson, schema } from './test-utils/persons-realm';

Expand Down
6 changes: 3 additions & 3 deletions src/RealmQuery.2-filter.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
//
////////////////////////////////////////////////////////////////////////////

import assert from 'assert';
import React from 'react';
import renderer from 'react-test-renderer';
import * as assert from 'assert';
import * as React from 'react';
import * as renderer from 'react-test-renderer';

import { IPerson, schema } from './test-utils/persons-realm';

Expand Down
6 changes: 3 additions & 3 deletions src/RealmQuery.3-sort.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
//
////////////////////////////////////////////////////////////////////////////

import assert from 'assert';
import React from 'react';
import renderer from 'react-test-renderer';
import * as assert from 'assert';
import * as React from 'react';
import * as renderer from 'react-test-renderer';

import { IPerson, schema } from './test-utils/persons-realm';

Expand Down
6 changes: 3 additions & 3 deletions src/RealmQuery.4-type-prop.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
//
////////////////////////////////////////////////////////////////////////////

import assert from 'assert';
import React from 'react';
import renderer from 'react-test-renderer';
import * as assert from 'assert';
import * as React from 'react';
import * as renderer from 'react-test-renderer';

import { IDog, IPerson, schema } from './test-utils/persons-realm';

Expand Down
6 changes: 3 additions & 3 deletions src/RealmQuery.5-filter-prop.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
//
////////////////////////////////////////////////////////////////////////////

import assert from 'assert';
import React from 'react';
import renderer from 'react-test-renderer';
import * as assert from 'assert';
import * as React from 'react';
import * as renderer from 'react-test-renderer';

import { IPerson, schema } from './test-utils/persons-realm';

Expand Down
6 changes: 3 additions & 3 deletions src/RealmQuery.6-sort-prop.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
//
////////////////////////////////////////////////////////////////////////////

import assert from 'assert';
import React from 'react';
import renderer from 'react-test-renderer';
import * as assert from 'assert';
import * as React from 'react';
import * as renderer from 'react-test-renderer';

import { IPerson, schema } from './test-utils/persons-realm';

Expand Down
6 changes: 3 additions & 3 deletions src/RealmQuery.7-swapped-realm.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
//
////////////////////////////////////////////////////////////////////////////

import assert from 'assert';
import React from 'react';
import renderer from 'react-test-renderer';
import * as assert from 'assert';
import * as React from 'react';
import * as renderer from 'react-test-renderer';

import { IPerson, schema } from './test-utils/persons-realm';

Expand Down
6 changes: 3 additions & 3 deletions src/RealmQuery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
//
////////////////////////////////////////////////////////////////////////////

import memoizeOne from 'memoize-one';
import React from 'react';
import Realm from 'realm';
import * as memoizeOne from 'memoize-one';
import * as React from 'react';
import * as Realm from 'realm';

import { IRealmContext } from '.';

Expand Down
8 changes: 4 additions & 4 deletions src/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
//
////////////////////////////////////////////////////////////////////////////

import assert from 'assert';
import React from 'react';
import renderer from 'react-test-renderer';
import Realm from 'realm';
import * as assert from 'assert';
import * as React from 'react';
import * as renderer from 'react-test-renderer';
import * as Realm from 'realm';

import {
createRealmContext,
Expand Down
4 changes: 2 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
//
////////////////////////////////////////////////////////////////////////////

import React from 'react';
import Realm from 'realm';
import * as React from 'react';
import * as Realm from 'realm';

import { generateRealmConnection } from './RealmConnection';
import { generateRealmConsumer, IRealmConsumerProps } from './RealmConsumer';
Expand Down
2 changes: 1 addition & 1 deletion src/test-utils/realm-js-logging.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Debug from 'debug';
import Realm from 'realm';
import * as Realm from 'realm';

enum SyncLogLevel {
all,
Expand Down
2 changes: 1 addition & 1 deletion src/test-utils/with-ros.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ITestCallbackContext } from 'mocha';
import Realm from 'realm';
import * as Realm from 'realm';
import { v4 as uuid } from 'uuid';

const { REALM_OBJECT_SERVER_URL } = process.env;
Expand Down
6 changes: 3 additions & 3 deletions src/withRealm.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
//
////////////////////////////////////////////////////////////////////////////

import assert from 'assert';
import React from 'react';
import renderer from 'react-test-renderer';
import * as assert from 'assert';
import * as React from 'react';
import * as renderer from 'react-test-renderer';

import { IPerson, schema } from './test-utils/persons-realm';

Expand Down
4 changes: 2 additions & 2 deletions src/withRealm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
//
////////////////////////////////////////////////////////////////////////////

import React from 'react';
import Realm from 'realm';
import * as React from 'react';
import * as Realm from 'realm';

import { IRealmConsumerProps } from '.';

Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"jsx": "react",
"noImplicitAny": true,
"declaration": true,
"esModuleInterop": true,
"typeRoots": ["./src/@types", "./node_modules/@types"]
},
"include": [
Expand Down

0 comments on commit fa82898

Please sign in to comment.