Skip to content

Commit 3800742

Browse files
author
mustafaiman
committed
removes depreceated import syntax
1 parent 0b9d261 commit 3800742

14 files changed

+23
-23
lines changed

src/DistributedObject.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Promise = Q.Promise;
1+
import * as Q from 'q';
22
export interface DistributedObject {
33
/*
44
* Returns the key of the partition that this DistributedObject is assigned to.
@@ -20,5 +20,5 @@ export interface DistributedObject {
2020
* Destroys this object cluster-wide.
2121
* Clears all resources taken for this object.
2222
*/
23-
destroy() : Promise<void>;
23+
destroy() : Q.Promise<void>;
2424
}

src/HazelcastClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {InvocationService, ListenerService} from './invocation/InvocationService
33
import ClientConnectionManager = require('./invocation/ClientConnectionManager');
44
import {ClientConfig} from './Config';
55
import ProxyManager = require('./proxy/ProxyManager');
6-
import Q = require('q');
6+
import * as Q from 'q';
77
import {IMap} from './IMap';
88
import {JsonSerializationService} from './serialization/SerializationService';
99
import PartitionService = require('./PartitionService');

src/Heartbeat.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {ClientPingCodec} from './codec/ClientPingCodec';
22
import HazelcastClient from './HazelcastClient';
33
import ClientConnection = require('./invocation/ClientConnection');
44
import {ConnectionHeartbeatListener} from './ConnectionHeartbeatListener';
5-
import Q = require('q');
5+
import * as Q from 'q';
66
import {LoggingService} from './LoggingService';
77
import Address = require('./Address');
88

src/IMap.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Promise = Q.Promise;
1+
import * as Q from 'q';
22
import {DistributedObject} from './DistributedObject';
33
export interface IMap<K, V> extends DistributedObject {
44

@@ -8,15 +8,15 @@ export interface IMap<K, V> extends DistributedObject {
88
* @throws {Error} if key is undefined or null
99
* @return a promise to be resolved to true if the map contains the key, false otherwise.
1010
*/
11-
containsKey(key: K) : Promise<boolean>;
11+
containsKey(key: K) : Q.Promise<boolean>;
1212

1313
/**
1414
* This method return true if this map has key(s) associated with given value
1515
* @throws {Error} if value is undefined or null
1616
* @param value
1717
* @return a promise to be resolved to true if the map has key or keys associated with given value.
1818
*/
19-
containsValue(value: V) : Promise<boolean>;
19+
containsValue(value: V) : Q.Promise<boolean>;
2020

2121
/**
2222
* Associates the specified value with the specified key.
@@ -29,15 +29,15 @@ export interface IMap<K, V> extends DistributedObject {
2929
* @throws {Error} if specified key or value is undefined or null or ttl is negative.
3030
* @return a promise to be resolved to the old value if there was any, undefined otherwise.
3131
*/
32-
put(key: K, value: V, ttl?: number) : Promise<V>;
32+
put(key: K, value: V, ttl?: number) : Q.Promise<V>;
3333

3434
/**
3535
* Retrieves the value associated with given key.
3636
* @param key
3737
* @throws {Error} if key is undefined or null
3838
* @return a promise to be resolved to the value associated with key, undefined if the key does not exist.
3939
*/
40-
get(key: K) : Promise<V>;
40+
get(key: K) : Q.Promise<V>;
4141

4242
/**
4343
* Removes specified key from map. If optional value is specified, the key is removed only if currently mapped to
@@ -48,24 +48,24 @@ export interface IMap<K, V> extends DistributedObject {
4848
* @throws {Error} if key is undefined or null
4949
* @return a promise to be resolved to the value associated with key, undefined if the key did not exist before.
5050
*/
51-
remove(key: K, value?: V) : Promise<V>;
51+
remove(key: K, value?: V) : Q.Promise<V>;
5252

5353
/**
5454
* Retrieves the number of elements in map
5555
* @return a promise to be resolved to the number of elements in map
5656
*/
57-
size() : Promise<number>;
57+
size() : Q.Promise<number>;
5858

5959
/**
6060
* Removes all of the mappings
6161
* @return
6262
*/
63-
clear() : Promise<void>;
63+
clear() : Q.Promise<void>;
6464

6565
/**
6666
* Returns whether this map is empty or not
6767
*/
68-
isEmpty() : Promise<boolean>;
68+
isEmpty() : Q.Promise<boolean>;
6969

7070
/**
7171
*

src/PartitionService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Q = require('q');
1+
import * as Q from 'q';
22
import GetPartitionsCodec = require('./codec/GetPartitionsCodec');
33
import ClientMessage = require('./ClientMessage');
44
import Address = require('./Address');

src/invocation/ClientConnection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import net = require('net');
2-
import Q = require('q');
2+
import * as Q from 'q';
33
import Address = require('../Address');
44
import {BitsUtil} from '../BitsUtil';
55
import {LoggingService} from '../LoggingService';

src/invocation/ClientConnectionManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Q = require('q');
1+
import * as Q from 'q';
22

33
import Address = require('../Address');
44
import ClientConnection = require('./ClientConnection');

src/invocation/ClusterService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import ClientConnection = require('./ClientConnection');
22
import Address = require('../Address');
3-
import Q = require('q');
3+
import * as Q from 'q';
44
import {ClientAddMembershipListenerCodec} from '../codec/ClientAddMembershipListenerCodec';
55
import ClientMessage = require('../ClientMessage');
66
import {Member} from '../Member';

src/invocation/ConnectionAuthenticator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Q = require('q');
1+
import * as Q from 'q';
22

33
import ClientConnection = require('./ClientConnection');
44
import {InvocationService} from './InvocationService';

src/invocation/InvocationService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import ClientConnection = require('./ClientConnection');
22
import ClientMessage = require('../ClientMessage');
3-
import Q = require('q');
3+
import * as Q from 'q';
44
import Long = require('long');
55
import {Data} from '../serialization/Data';
66
import Address = require('../Address');

src/proxy/BaseProxy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {SerializationService} from '../serialization/SerializationService';
22
import {Data} from '../serialization/Data';
33
import ClientMessage = require('../ClientMessage');
4-
import Q = require('q');
4+
import * as Q from 'q';
55
import HazelcastClient from '../HazelcastClient';
66

77
export class BaseProxy {

src/proxy/Map.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {BaseProxy} from './BaseProxy';
22
import {IMap} from '../IMap';
3-
import Q = require('q');
3+
import * as Q from 'q';
44
import {Data} from '../serialization/Data';
55
import {MapPutCodec} from '../codec/MapPutCodec';
66
import ClientMessage = require('../ClientMessage');

src/proxy/ProxyManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Q = require('q');
1+
import * as Q from 'q';
22
import {DistributedObject} from '../DistributedObject';
33
import {Map} from './Map';
44
import {BaseProxy} from './BaseProxy';

src/proxy/Set.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {BaseProxy} from '../proxy/BaseProxy';
22
import {ISet} from '../ISet';
3-
import Q = require('q');
3+
import * as Q from 'q';
44
export class Set<E> extends BaseProxy implements ISet<E> {
55
add(entry : E) : Q.Promise<boolean> {
66
//TODO

0 commit comments

Comments
 (0)