pubkey / rxdb

A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/
https://rxdb.info/
Apache License 2.0
21.62k stars 1.06k forks source link

Cann't import rxdb on angular9 #2324

Closed molysama closed 4 years ago

molysama commented 4 years ago

Case

Bug

Issue

I can't import anything on angular9. There are a lot of type errors at compile time.

Info

Code

import { createRxDatabase } from 'rxdb'
ERROR in node_modules/event-reduce-js/dist/es/index.d.ts:1:13 - error TS1005: '=' expected.

1 import type { ChangeEvent, ActionName, ResultKeyDocumentMap, QueryParams, StateSetToActionMap, StateSet, ActionFunction, StateResolveFunctionInput } from './types';
              ~
node_modules/event-reduce-js/dist/es/index.d.ts:1:155 - error TS1005: ';' expected.

1 import type { ChangeEvent, ActionName, ResultKeyDocumentMap, QueryParams, StateSetToActionMap, StateSet, ActionFunction, StateResolveFunctionInput } from './types';
                                                                                                                                                            ~~~~~~~~~
node_modules/event-reduce-js/dist/es/states/index.d.ts:2:13 - error TS1005: '=' expected.

2 import type { StateName, StateResolveFunction, StateSet, StateResolveFunctionInput } from '../types';
              ~
node_modules/event-reduce-js/dist/es/states/index.d.ts:2:91 - error TS1005: ';' expected.
pubkey commented 4 years ago

You have to upgrade your typescript version.

molysama commented 4 years ago

good job. It works after upgrade angular to v10.