fix: use `isolatedModules: true` in tsconfig.json (#469)
* fix: use `isolatedModules: true` in tsconfig.json This setting ensures the module can be used in projects where the workflow includes type checking and transpilation as two separate steps. See: https://ncjamieson.com/dont-export-const-enums/ Fixes: https://github.com/cloudevents/sdk-javascript/issues/456 Signed-off-by: Lance Ball <lball@redhat.com>
This commit is contained in:
parent
f36a1f0428
commit
b5c0b56f52
27
src/index.ts
27
src/index.ts
|
@ -17,30 +17,33 @@ import CONSTANTS from "./constants";
|
|||
export {
|
||||
// From event
|
||||
CloudEvent,
|
||||
CloudEventV1,
|
||||
CloudEventV1Attributes,
|
||||
Version,
|
||||
ValidationError,
|
||||
Mode,
|
||||
HTTP,
|
||||
Kafka,
|
||||
MQTT,
|
||||
MQTTMessageFactory,
|
||||
emitterFor,
|
||||
Emitter,
|
||||
// From Constants
|
||||
CONSTANTS
|
||||
};
|
||||
|
||||
export type {
|
||||
CloudEventV1,
|
||||
CloudEventV1Attributes,
|
||||
// From message
|
||||
Headers,
|
||||
Mode,
|
||||
Binding,
|
||||
Message,
|
||||
Deserializer,
|
||||
Serializer,
|
||||
HTTP,
|
||||
Kafka,
|
||||
KafkaEvent,
|
||||
KafkaMessage,
|
||||
MQTT,
|
||||
MQTTMessage,
|
||||
MQTTMessageFactory,
|
||||
// From transport
|
||||
TransportFunction,
|
||||
EmitterFunction,
|
||||
emitterFor,
|
||||
Emitter,
|
||||
Options,
|
||||
// From Constants
|
||||
CONSTANTS,
|
||||
Options
|
||||
};
|
||||
|
|
|
@ -10,7 +10,10 @@ import { sanitize } from "../http/headers";
|
|||
|
||||
// Export the binding implementation and message interface
|
||||
export {
|
||||
Kafka,
|
||||
Kafka
|
||||
};
|
||||
|
||||
export type {
|
||||
KafkaMessage,
|
||||
KafkaEvent
|
||||
};
|
||||
|
|
|
@ -6,10 +6,9 @@
|
|||
import { Binding, Deserializer, CloudEvent, CloudEventV1, CONSTANTS, Message, ValidationError, Headers } from "../..";
|
||||
|
||||
export {
|
||||
MQTT,
|
||||
MQTTMessage,
|
||||
MQTTMessageFactory
|
||||
MQTT, MQTTMessageFactory
|
||||
};
|
||||
export type { MQTTMessage };
|
||||
|
||||
/**
|
||||
* Extends the base {@linkcode Message} interface to include MQTT attributes, some of which
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
"forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */
|
||||
"outDir": "./dist",
|
||||
"declaration": true,
|
||||
"experimentalDecorators": true
|
||||
"experimentalDecorators": true,
|
||||
"isolatedModules": true,
|
||||
},
|
||||
"compileOnSave": true,
|
||||
"include": [
|
||||
|
|
Loading…
Reference in New Issue