mark all abstract functions abstract (#1383)

pull/1386/head
Dimava 2 years ago committed by GitHub
parent 81d65e5801
commit 561318b7db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -211,6 +211,7 @@ export class GameState {
/** /**
* Should return the html code of the state. * Should return the html code of the state.
* @returns {string} * @returns {string}
* @abstract
*/ */
getInnerHTML() { getInnerHTML() {
abstract; abstract;

@ -11,6 +11,7 @@ export class BaseSprite {
/** /**
* Returns the raw handle * Returns the raw handle
* @returns {HTMLImageElement|HTMLCanvasElement} * @returns {HTMLImageElement|HTMLCanvasElement}
* @abstract
*/ */
getRawTexture() { getRawTexture() {
abstract; abstract;

@ -29,6 +29,7 @@ export class BaseItem extends BasicSerializableObject {
/** /**
* Returns a string id of the item * Returns a string id of the item
* @returns {string} * @returns {string}
* @abstract
*/ */
getAsCopyableKey() { getAsCopyableKey() {
abstract; abstract;
@ -49,9 +50,9 @@ export class BaseItem extends BasicSerializableObject {
/** /**
* Override for custom comparison * Override for custom comparison
* @abstract
* @param {BaseItem} other * @param {BaseItem} other
* @returns {boolean} * @returns {boolean}
* @abstract
*/ */
equalsImpl(other) { equalsImpl(other) {
abstract; abstract;
@ -62,6 +63,7 @@ export class BaseItem extends BasicSerializableObject {
* Draws the item to a canvas * Draws the item to a canvas
* @param {CanvasRenderingContext2D} context * @param {CanvasRenderingContext2D} context
* @param {number} size * @param {number} size
* @abstract
*/ */
drawFullSizeOnCanvas(context, size) { drawFullSizeOnCanvas(context, size) {
abstract; abstract;
@ -86,6 +88,7 @@ export class BaseItem extends BasicSerializableObject {
* @param {number} y * @param {number} y
* @param {DrawParameters} parameters * @param {DrawParameters} parameters
* @param {number=} diameter * @param {number=} diameter
* @abstract
*/ */
drawItemCenteredImpl(x, y, parameters, diameter = globalConfig.defaultItemDiameter) { drawItemCenteredImpl(x, y, parameters, diameter = globalConfig.defaultItemDiameter) {
abstract; abstract;

@ -4,6 +4,7 @@ export class Component extends BasicSerializableObject {
/** /**
* Returns the components unique id * Returns the components unique id
* @returns {string} * @returns {string}
* @abstract
*/ */
static getId() { static getId() {
abstract; abstract;

@ -224,6 +224,7 @@ export class Entity extends BasicSerializableObject {
/** /**
* override, should draw the entity * override, should draw the entity
* @param {DrawParameters} parameters * @param {DrawParameters} parameters
* @abstract
*/ */
drawImpl(parameters) { drawImpl(parameters) {
abstract; abstract;

@ -144,6 +144,7 @@ export class GameMode extends BasicSerializableObject {
/** /**
* @param {number} w * @param {number} w
* @param {number} h * @param {number} h
* @abstract
*/ */
adjustZone(w = 0, h = 0) { adjustZone(w = 0, h = 0) {
abstract; abstract;

@ -25,6 +25,7 @@ export class BaseHUDPart {
/** /**
* Should initialize the element, called *after* the elements have been created * Should initialize the element, called *after* the elements have been created
* @abstract
*/ */
initialize() { initialize() {
abstract; abstract;

@ -278,6 +278,7 @@ export class MetaBuilding {
* Should setup the entity components * Should setup the entity components
* @param {Entity} entity * @param {Entity} entity
* @param {GameRoot} root * @param {GameRoot} root
* @abstract
*/ */
setupEntityComponents(entity, root) { setupEntityComponents(entity, root) {
abstract; abstract;

@ -92,6 +92,7 @@ export class AchievementProviderInterface {
/** /**
* Initializes the achievement provider. * Initializes the achievement provider.
* @returns {Promise<void>} * @returns {Promise<void>}
* @abstract
*/ */
initialize() { initialize() {
abstract; abstract;
@ -102,6 +103,7 @@ export class AchievementProviderInterface {
* Opportunity to do additional initialization work with the GameRoot. * Opportunity to do additional initialization work with the GameRoot.
* @param {GameRoot} root * @param {GameRoot} root
* @returns {Promise<void>} * @returns {Promise<void>}
* @abstract
*/ */
onLoad(root) { onLoad(root) {
abstract; abstract;
@ -118,6 +120,7 @@ export class AchievementProviderInterface {
* Call to activate an achievement with the provider * Call to activate an achievement with the provider
* @param {string} key - Maps to an Achievement * @param {string} key - Maps to an Achievement
* @returns {Promise<void>} * @returns {Promise<void>}
* @abstract
*/ */
activate(key) { activate(key) {
abstract; abstract;
@ -127,6 +130,7 @@ export class AchievementProviderInterface {
/** /**
* Checks if achievements are supported in the current build * Checks if achievements are supported in the current build
* @returns {boolean} * @returns {boolean}
* @abstract
*/ */
hasAchievements() { hasAchievements() {
abstract; abstract;

@ -19,6 +19,7 @@ export class AdProviderInterface {
/** /**
* Returns if this provider serves ads at all * Returns if this provider serves ads at all
* @returns {boolean} * @returns {boolean}
* @abstract
*/ */
getHasAds() { getHasAds() {
abstract; abstract;
@ -29,6 +30,7 @@ export class AdProviderInterface {
* Returns if it would be possible to show a video ad *now*. This can be false if for * Returns if it would be possible to show a video ad *now*. This can be false if for
* example the last video ad is * example the last video ad is
* @returns {boolean} * @returns {boolean}
* @abstract
*/ */
getCanShowVideoAd() { getCanShowVideoAd() {
abstract; abstract;

@ -11,6 +11,7 @@ export class AnalyticsInterface {
/** /**
* Initializes the analytics * Initializes the analytics
* @returns {Promise<void>} * @returns {Promise<void>}
* @abstract
*/ */
initialize() { initialize() {
abstract; abstract;

@ -11,6 +11,7 @@ export class GameAnalyticsInterface {
/** /**
* Initializes the analytics * Initializes the analytics
* @returns {Promise<void>} * @returns {Promise<void>}
* @abstract
*/ */
initialize() { initialize() {
abstract; abstract;
@ -43,6 +44,7 @@ export class GameAnalyticsInterface {
/** /**
* Activates a DLC * Activates a DLC
* @param {string} dlc * @param {string} dlc
* @abstract
*/ */
activateDlc(dlc) { activateDlc(dlc) {
abstract; abstract;

@ -13,6 +13,7 @@ export class StorageInterface {
/** /**
* Initializes the storage * Initializes the storage
* @returns {Promise<void>} * @returns {Promise<void>}
* @abstract
*/ */
initialize() { initialize() {
abstract; abstract;
@ -24,6 +25,7 @@ export class StorageInterface {
* @param {string} filename * @param {string} filename
* @param {string} contents * @param {string} contents
* @returns {Promise<void>} * @returns {Promise<void>}
* @abstract
*/ */
writeFileAsync(filename, contents) { writeFileAsync(filename, contents) {
abstract; abstract;
@ -34,6 +36,7 @@ export class StorageInterface {
* Reads a string asynchronously. Returns Promise<FILE_NOT_FOUND> if file was not found. * Reads a string asynchronously. Returns Promise<FILE_NOT_FOUND> if file was not found.
* @param {string} filename * @param {string} filename
* @returns {Promise<string>} * @returns {Promise<string>}
* @abstract
*/ */
readFileAsync(filename) { readFileAsync(filename) {
abstract; abstract;

@ -81,6 +81,7 @@ export class PlatformWrapperInterface {
* Attempt to open an external url * Attempt to open an external url
* @param {string} url * @param {string} url
* @param {boolean=} force Whether to always open the url even if not allowed * @param {boolean=} force Whether to always open the url even if not allowed
* @abstract
*/ */
openExternalLink(url, force = false) { openExternalLink(url, force = false) {
abstract; abstract;
@ -88,6 +89,7 @@ export class PlatformWrapperInterface {
/** /**
* Attempt to restart the app * Attempt to restart the app
* @abstract
*/ */
performRestart() { performRestart() {
abstract; abstract;
@ -103,6 +105,7 @@ export class PlatformWrapperInterface {
/** /**
* Should set the apps fullscreen state to the desired state * Should set the apps fullscreen state to the desired state
* @param {boolean} flag * @param {boolean} flag
* @abstract
*/ */
setFullscreen(flag) { setFullscreen(flag) {
abstract; abstract;
@ -117,6 +120,7 @@ export class PlatformWrapperInterface {
/** /**
* Attempts to quit the app * Attempts to quit the app
* @abstract
*/ */
exitApp() { exitApp() {
abstract; abstract;

@ -64,6 +64,7 @@ export class BaseSetting {
/** /**
* Returns the HTML for this setting * Returns the HTML for this setting
* @param {Application} app * @param {Application} app
* @abstract
*/ */
getHtml(app) { getHtml(app) {
abstract; abstract;
@ -84,6 +85,7 @@ export class BaseSetting {
/** /**
* Attempts to modify the setting * Attempts to modify the setting
* @abstract
*/ */
modify() { modify() {
abstract; abstract;
@ -107,6 +109,7 @@ export class BaseSetting {
* Validates the set value * Validates the set value
* @param {any} value * @param {any} value
* @returns {boolean} * @returns {boolean}
* @abstract
*/ */
validate(value) { validate(value) {
abstract; abstract;

@ -48,6 +48,7 @@ export class BaseDataType {
/** /**
* Serializes a given raw value * Serializes a given raw value
* @param {any} value * @param {any} value
* @abstract
*/ */
serialize(value) { serialize(value) {
abstract; abstract;
@ -68,6 +69,7 @@ export class BaseDataType {
* @param {object} targetObject * @param {object} targetObject
* @param {string|number} targetKey * @param {string|number} targetKey
* @returns {string|void} String error code or null on success * @returns {string|void} String error code or null on success
* @abstract
*/ */
deserialize(value, targetObject, targetKey, root) { deserialize(value, targetObject, targetKey, root) {
abstract; abstract;
@ -92,6 +94,7 @@ export class BaseDataType {
/** /**
* INTERNAL Should return the json schema representation * INTERNAL Should return the json schema representation
* @abstract
*/ */
getAsJsonSchemaUncached() { getAsJsonSchemaUncached() {
abstract; abstract;
@ -131,6 +134,7 @@ export class BaseDataType {
/** /**
* Should return a cacheable key * Should return a cacheable key
* @abstract
*/ */
getCacheKey() { getCacheKey() {
abstract; abstract;

Loading…
Cancel
Save