parse-tmx 2.8.1 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +0 -10
- package/dist/index.js +371 -595
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -176,8 +176,6 @@ declare class TMXParsed {
|
|
|
176
176
|
}
|
|
177
177
|
//#endregion
|
|
178
178
|
//#region src/parseTmx.d.ts
|
|
179
|
-
// We will match phaser's tmx => json tilemap export transformation
|
|
180
|
-
// but also support extra functionality like using external tilesets
|
|
181
179
|
declare const parseTmx: (xmlString: string, translateFlips?: boolean) => Promise<TMXParsed>;
|
|
182
180
|
//#endregion
|
|
183
181
|
//#region src/models/Compression.d.ts
|
|
@@ -203,19 +201,13 @@ declare enum Flipped {
|
|
|
203
201
|
declare const isExternalTileset: (tileset: TMXEmbeddedTilesetShared | TMXExternalTilesetShared) => tileset is TMXExternalTilesetShared;
|
|
204
202
|
//#endregion
|
|
205
203
|
//#region src/models/tmx/node/BaseTMXNode.d.ts
|
|
206
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
207
204
|
declare class BaseTMXNode<T> {
|
|
208
205
|
#private;
|
|
209
|
-
// We add indexable signature because we can't access #name properly
|
|
210
|
-
// due to typescript shenanigans with private properties >:C
|
|
211
206
|
[key: string]: unknown;
|
|
212
207
|
$: T;
|
|
213
208
|
}
|
|
214
209
|
//#endregion
|
|
215
210
|
//#region src/models/tmx/node/TMXNode.d.ts
|
|
216
|
-
// For convenience's sake, we will assume that parsing xml will always have
|
|
217
|
-
// explicitChildren && preserveChildrenOrder set to true and we will type that instead
|
|
218
|
-
// We deal with dynamic xml data by typing it explicitly in the specific types that extend this interface
|
|
219
211
|
type TMXNode<T, TChildNode extends BaseTMXNode<unknown> | undefined = undefined> = BaseTMXNode<T> & {
|
|
220
212
|
$$: TChildNode extends undefined ? undefined : TChildNode[];
|
|
221
213
|
};
|
|
@@ -236,8 +228,6 @@ interface TMXPropertyNode extends TMXNode<{
|
|
|
236
228
|
name: string;
|
|
237
229
|
value?: string;
|
|
238
230
|
}> {
|
|
239
|
-
// Phaser stores string with special unicode values as data
|
|
240
|
-
// instead of the value attribute, which is why value can be undefined
|
|
241
231
|
_: string;
|
|
242
232
|
}
|
|
243
233
|
//#endregion
|