New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@gooddata/typings

Package Overview
Dependencies
Maintainers
42
Versions
304
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gooddata/typings - npm Package Compare versions

Comparing version 2.19.0 to 2.20.0-alpha-milangallasgooddata-bb-1958-2019-12-18T13-36-54-770Z

dist/src/tests/InvalidTypeguardScenarios.d.ts

2

dist/src/AFM.d.ts

@@ -221,2 +221,4 @@ /**

function isExpressionFilter(filter: AFM.CompatibilityFilter): filter is AFM.IExpressionFilter;
function isComparisonCondition(condition: AFM.MeasureValueFilterCondition): condition is AFM.IComparisonCondition;
function isRangeCondition(condition: AFM.MeasureValueFilterCondition): condition is AFM.IRangeCondition;
}

@@ -89,3 +89,11 @@ "use strict";

AFM.isExpressionFilter = isExpressionFilter;
function isComparisonCondition(condition) {
return !isEmpty(condition) && condition.comparison !== undefined;
}
AFM.isComparisonCondition = isComparisonCondition;
function isRangeCondition(condition) {
return !isEmpty(condition) && condition.range !== undefined;
}
AFM.isRangeCondition = isRangeCondition;
})(AFM = exports.AFM || (exports.AFM = {}));
//# sourceMappingURL=AFM.js.map

@@ -5,2 +5,3 @@ "use strict";

var AFM_1 = require("../AFM");
var InvalidTypeguardScenarios_1 = require("./InvalidTypeguardScenarios");
describe('AFM', function () {

@@ -701,3 +702,34 @@ describe('isObjectUriQualifier', function () {

});
var rangeCondition = {
range: {
from: 100,
to: 200,
operator: 'BETWEEN'
}
};
var comparisonCondition = {
comparison: {
operator: 'EQUAL_TO',
value: 200
}
};
describe('isComparisonCondition', function () {
var Scenarios = InvalidTypeguardScenarios_1.InvalidTypeGuardInputTestCases.concat([
[true, 'true', comparisonCondition],
[false, 'false', rangeCondition]
]);
it.each(Scenarios)('should return %s when input is %s', function (expectedResult, _desc, input) {
expect(AFM_1.AFM.isComparisonCondition(input)).toBe(expectedResult);
});
});
describe('isRangeCondition', function () {
var Scenarios = InvalidTypeguardScenarios_1.InvalidTypeGuardInputTestCases.concat([
[true, 'true', rangeCondition],
[false, 'false', comparisonCondition]
]);
it.each(Scenarios)('should return %s when input is %s', function (expectedResult, _desc, input) {
expect(AFM_1.AFM.isRangeCondition(input)).toBe(expectedResult);
});
});
});
//# sourceMappingURL=AFM.test.js.map

@@ -541,3 +541,89 @@ "use strict";

});
describe('isLocalIdentifierQualifier', function () {
it('should return false when null is tested', function () {
var result = VisualizationObject_1.VisualizationObject.isLocalIdentifierQualifier(null);
expect(result).toEqual(false);
});
it('should return false when undefined is tested', function () {
var result = VisualizationObject_1.VisualizationObject.isLocalIdentifierQualifier(undefined);
expect(result).toEqual(false);
});
it('should return false when object uri qualifier is tested', function () {
var objUriQualifier = {
uri: '/gdc/mock/measure'
};
var result = VisualizationObject_1.VisualizationObject.isLocalIdentifierQualifier(objUriQualifier);
expect(result).toEqual(false);
});
it('should return true when object local qualifier is tested', function () {
var localIdentifierQualifier = {
localIdentifier: 'localId'
};
var result = VisualizationObject_1.VisualizationObject.isLocalIdentifierQualifier(localIdentifierQualifier);
expect(result).toEqual(true);
});
});
describe('isComparisonCondition', function () {
it('should return false when null is tested', function () {
var result = VisualizationObject_1.VisualizationObject.isComparisonCondition(null);
expect(result).toEqual(false);
});
it('should return false when undefined is tested', function () {
var result = VisualizationObject_1.VisualizationObject.isComparisonCondition(undefined);
expect(result).toEqual(false);
});
it('should return false when a range condition is tested', function () {
var rangeCondition = {
range: {
operator: 'BETWEEN',
from: 10,
to: 100
}
};
var result = VisualizationObject_1.VisualizationObject.isComparisonCondition(rangeCondition);
expect(result).toEqual(false);
});
it('should return true when a comparison condition is tested', function () {
var comparisonCondition = {
comparison: {
operator: 'EQUAL_TO',
value: 100
}
};
var result = VisualizationObject_1.VisualizationObject.isComparisonCondition(comparisonCondition);
expect(result).toEqual(true);
});
});
describe('isRangeCondition', function () {
it('should return false when null is tested', function () {
var result = VisualizationObject_1.VisualizationObject.isRangeCondition(null);
expect(result).toEqual(false);
});
it('should return false when undefined is tested', function () {
var result = VisualizationObject_1.VisualizationObject.isRangeCondition(undefined);
expect(result).toEqual(false);
});
it('should return false when a comparison condition is tested', function () {
var comparisonCondition = {
comparison: {
operator: 'EQUAL_TO',
value: 100
}
};
var result = VisualizationObject_1.VisualizationObject.isRangeCondition(comparisonCondition);
expect(result).toEqual(false);
});
it('should return true when a range condition is tested', function () {
var rangeCondition = {
range: {
operator: 'BETWEEN',
from: 10,
to: 100
}
};
var result = VisualizationObject_1.VisualizationObject.isRangeCondition(rangeCondition);
expect(result).toEqual(true);
});
});
});
//# sourceMappingURL=VisualizationObject.test.js.map

@@ -163,2 +163,5 @@ import { IObjectMeta } from './Meta';

function isAttribute(bucketItem: BucketItem): bucketItem is IVisualizationAttribute;
function isLocalIdentifierQualifier(objectQualifier: IObjUriQualifier | ILocalIdentifierQualifier): objectQualifier is ILocalIdentifierQualifier;
function isComparisonCondition(condition: MeasureValueFilterCondition): condition is IComparisonCondition;
function isRangeCondition(condition: MeasureValueFilterCondition): condition is IRangeCondition;
}

@@ -58,3 +58,16 @@ "use strict";

VisualizationObject.isAttribute = isAttribute;
function isLocalIdentifierQualifier(objectQualifier) {
return (!isEmpty(objectQualifier) &&
objectQualifier.localIdentifier !== undefined);
}
VisualizationObject.isLocalIdentifierQualifier = isLocalIdentifierQualifier;
function isComparisonCondition(condition) {
return !isEmpty(condition) && condition.comparison !== undefined;
}
VisualizationObject.isComparisonCondition = isComparisonCondition;
function isRangeCondition(condition) {
return !isEmpty(condition) && condition.range !== undefined;
}
VisualizationObject.isRangeCondition = isRangeCondition;
})(VisualizationObject = exports.VisualizationObject || (exports.VisualizationObject = {}));
//# sourceMappingURL=VisualizationObject.js.map

2

package.json
{
"name": "@gooddata/typings",
"version": "2.19.0",
"version": "2.20.0-alpha-milangallasgooddata-bb-1958-2019-12-18T13-36-54-770Z",
"description": "TypeScript definition files for GoodData platform",

@@ -5,0 +5,0 @@ "typings": "dist/index.d.ts",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc