Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Export types from index file
  • Loading branch information
erikeldridge committed Feb 14, 2024
commit ca8093ac2e492a1896ec4e8b61e6bc2f6b6c156a
3 changes: 3 additions & 0 deletions src/remote-config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ export {
RemoteConfigParameterGroup,
RemoteConfigParameterValue,
RemoteConfigTemplate,
RemoteConfigServerConfig,
RemoteConfigServerTemplate,
RemoteConfigServerTemplateData,
RemoteConfigUser,
TagColor,
Version,
Expand Down
14 changes: 11 additions & 3 deletions test/integration/remote-config.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ import {
ParameterValueType,
RemoteConfigCondition,
RemoteConfigTemplate,
RemoteConfigServerConfig,
RemoteConfigServerTemplate,
RemoteConfigServerTemplateData
} from '../../lib/remote-config/index';
import { RemoteConfigServerTemplate } from '../../src/remote-config/remote-config-api';

chai.should();
chai.use(chaiAsPromised);
Expand Down Expand Up @@ -341,8 +343,14 @@ describe('admin.remoteConfig', () => {
// server that doesn't implement all endpoints.
return rc.getServerTemplate()
.then((template: RemoteConfigServerTemplate) => {
expect(template.cache).to.deep.equal(VALID_TEMPLATE);
expect(template.evaluate()).to.deep.equal({ welcome_message:'welcome text 1706578886883' });
// Demonstrates explicit template data type usage.
const templateData: RemoteConfigServerTemplateData = template.cache;
expect(templateData).to.deep.equal(VALID_TEMPLATE);
// Demonstrates config type usage.
const config: RemoteConfigServerConfig = template.evaluate();
expect(config).to.deep.equal({
welcome_message: 'welcome text 1706578886883'
});
});
});
});
Expand Down