Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDBKeyRange member definition is wrong #1243

Closed
falsandtru opened this issue Nov 22, 2014 · 4 comments
Closed

IDBKeyRange member definition is wrong #1243

falsandtru opened this issue Nov 22, 2014 · 4 comments
Labels
Duplicate An existing issue was already created

Comments

@falsandtru
Copy link
Contributor

IDBKeyRange has defined variable only member (except the prototype).
This type can not be declare nor cast.

// Example of other definition.
interface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
    operator: SVGAnimatedEnumeration; // interface only
    radiusX: SVGAnimatedNumber; // interface only
    radiusY: SVGAnimatedNumber; // interface only
    in1: SVGAnimatedString; // interface only
    SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number; // common
    SVG_MORPHOLOGY_OPERATOR_ERODE: number; // common
    SVG_MORPHOLOGY_OPERATOR_DILATE: number; // common
}
declare var SVGFEMorphologyElement: {
    prototype: SVGFEMorphologyElement;
    new(): SVGFEMorphologyElement;
    SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number; // common
    SVG_MORPHOLOGY_OPERATOR_ERODE: number; // common
    SVG_MORPHOLOGY_OPERATOR_DILATE: number; // common
}
// IDBKeyRange definition has variable only member.
interface IDBKeyRange {
    upper: any; // interface only
    upperOpen: boolean; // interface only
    lower: any; // interface only
    lowerOpen: boolean; // interface only
    // After definition is not defined.
    // Must be modified to suit the W3C definition.
    //bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
    //only(value: any): IDBKeyRange;
    //lowerBound(bound: any, open?: boolean): IDBKeyRange;
    //upperBound(bound: any, open?: boolean): IDBKeyRange;
}
declare var IDBKeyRange: {
    prototype: IDBKeyRange;
    new(): IDBKeyRange;
    bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange; // VARIABLE ONLY!!
    only(value: any): IDBKeyRange; // VARIABLE ONLY!!
    lowerBound(bound: any, open?: boolean): IDBKeyRange; // VARIABLE ONLY!!
    upperBound(bound: any, open?: boolean): IDBKeyRange; // VARIABLE ONLY!!
}

http://www.w3.org/TR/IndexedDB/#range-concept

interface IDBKeyRange {
readonly attribute any lower;
readonly attribute any upper;
readonly attribute boolean lowerOpen;
readonly attribute boolean upperOpen;
static IDBKeyRange only (any value);
static IDBKeyRange lowerBound (any lower, optional boolean open);
static IDBKeyRange upperBound (any upper, optional boolean open);
static IDBKeyRange bound (any lower, any upper, optional boolean lowerOpen, optional boolean upperOpen);

};

@danquirk
Copy link
Member

#1075 already covers issues with this type.

@danquirk danquirk added the Duplicate An existing issue was already created label Nov 24, 2014
@falsandtru
Copy link
Contributor Author

No, it is not a duplicate because the target is different.
You do not answer whether the definition of the current method is correct.
I continued until you notice it.

@danquirk
Copy link
Member

We don't need 3 issues tracking errors in the same type definition. #1075 already has been triaged with the Bug label and assigned a milestone meaning we intend to fix it. Additional comments there are sufficient to get noticed if something has slipped through the cracks.

@falsandtru
Copy link
Contributor Author

#1075 is a different issuer. And the issuer is already conclusive as a constructor of bug.

This issuer to hold. I found a more fundamental problem.

@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

2 participants