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

chore: refactored bitmap typings #72

Merged
merged 1 commit into from
Dec 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion models/Artboard/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import RulerData from '../RulerData';

declare class Artboard extends Group {
_class: 'artboard';
shouldBreakMaskChain: boolean;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inherited from Layer same for other similar changes

backgroundColor: Color;
hasBackgroundColor: boolean;
horizontalRulerData: RulerData;
Expand Down
70 changes: 18 additions & 52 deletions models/Bitmap/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,58 +11,24 @@
* and limitations under the License.
*/


export interface BitmapLayer {
_class?: 'bitmapLayer'
booleanOperation?: number
clippingMask: Record<string, any>
clippingMaskMode?: number
do_objectID?: string
exportOptions?: {
[k: string]: any
}
fillReplacesImage?: boolean
flow?: {
[k: string]: any
}
frame?: {
[k: string]: any
}
hasClippingMask?: boolean
image?: {
[k: string]: any
}
imageHash?: {
[k: string]: any
}
import Layer = require('../Layer');

declare class Bitmap extends Layer {
_class: 'bitmap';
clippingMask: Record<string, any>;
clippingMaskMode?: number;
fillReplacesImage?: boolean;
flow?: Record<string, any>;
hasClippingMask?: boolean;
image?: Record<string, any>;
imageHash?: Record<string, any>;
/**
* The scale the image was imported with into Sketch. This can be derived on import from the DPI of the image or the suffixes (@2x) of the filename. On legacy documents defaults to 0, which is meant to be the default image DPI of 72.
*/
intendedDPI?: number
isFixedToViewport?: boolean
isFlippedHorizontal?: boolean
isFlippedVertical?: boolean
isLocked?: boolean
isVisible?: boolean
layerListExpandedType?: number
name?: {
[k: string]: any
}
nameIsFixed?: boolean
originalObjectID?: {
[k: string]: any
}
resizingConstraint?: number
resizingType?: number
rotation?: number
sharedStyleID?: {
[k: string]: any
}
shouldBreakMaskChain?: boolean
style?: {
[k: string]: any
}
userInfo?: {
[k: string]: any
}
}
intendedDPI?: number;
originalObjectID?: Record<string, any>;
sharedStyleID?: Record<string, any>;
userInfo?: Record<string, any>
}

export = Bitmap;
2 changes: 0 additions & 2 deletions models/Group/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import Layer from '../Layer';

declare class Group extends Layer {
_class: string;
layerListExpandedType: number;
resizingConstraint: number;
hasClickThrough: boolean;
constructor(args?: any, json?: any);
}
Expand Down
1 change: 0 additions & 1 deletion models/Layer/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ declare class Layer {
isFlippedVertical: boolean;
isLocked: boolean;
isVisible: boolean;
layerListExpandedType: number;
name: string;
nameIsFixed: boolean;
resizingConstraint: number;
Expand Down
2 changes: 0 additions & 2 deletions models/Page/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ declare class Page extends Group {

constructor(args?: any, json?: any);

getID(): string;

getArtboards(predicate?: string | RegExp): Artboard[];

getArtboard(name: string): Artboard | undefined;
Expand Down
1 change: 0 additions & 1 deletion models/ShapeGroup/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ declare class ShapeGroup extends Layer {
static ShapePath(args: any): ShapeGroup;

_class: 'shapeGroup';
layerListExpandedType: number;
clippingMaskMode: number;
hasClippingMask: boolean;
windingRule: number;
Expand Down