Skip to content

Commit abffd58

Browse files
committed
chore(types): keep module-keyword namespace declarations
The module keyword only errors when lib files are type-checked; with skipLibCheck both forms are equivalent, so leave the typings packages untouched.
1 parent 17063bd commit abffd58

6 files changed

Lines changed: 21 additions & 21 deletions

File tree

‎packages/core/global-types.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ declare interface NativeScriptError extends Error {
2525
}
2626

2727
//Augment the NodeJS global type with our own extensions
28-
declare namespace globalThis {
28+
declare module globalThis {
2929
var NativeScriptHasPolyfilled: boolean;
3030
var NativeScriptGlobals: {
3131
/**

‎packages/types-android/src/lib/android/android-declarations.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interface ArrayConstructor {
1818
create(type: any, count: number): any;
1919
}
2020

21-
declare namespace androidNative { export class Array<T> { constructor(); length: number; [index: number]: T; } }
21+
declare module androidNative { export class Array<T> { constructor(); length: number; [index: number]: T; } }
2222

2323
import globalAndroid = android;
2424

‎packages/types-android/src/lib/android/org.nativescript.widgets.d.ts‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
declare namespace org {
2-
namespace nativescript {
3-
namespace widgets {
1+
declare module org {
2+
module nativescript {
3+
module widgets {
44
export class BoxShadowDrawable {
55
public constructor(drawable: android.graphics.drawable.Drawable, values: number[]);
66
public getWrappedDrawable(): android.graphics.drawable.Drawable;
@@ -12,7 +12,7 @@
1212
public setResetOnTransitionEnd(resetOnTransitionEnd: boolean): void;
1313
public getTransitionName(): string;
1414
}
15-
export namespace Async {
15+
export module Async {
1616
export class CompleteCallback {
1717
constructor(implementation: ICompleteCallback);
1818
onComplete(result: Object, context: Object): void;
@@ -24,11 +24,11 @@
2424
onError(error: string, context: Object): void;
2525
}
2626

27-
export namespace Image {
27+
export module Image {
2828
export function download(url: string, callback: CompleteCallback, context: any);
2929
}
3030

31-
export namespace File {
31+
export module File {
3232
export function copySync(src: string, dest: string, context: android.content.Context): boolean;
3333
export function copy(src: java.io.InputStream, dest: java.io.OutputStream, callback: org.nativescript.widgets.Async.CompleteCallback, context: any): void;
3434
export function copySync(src: java.io.InputStream, dest: java.io.OutputStream, context: any): boolean;
@@ -44,7 +44,7 @@
4444
export function appendText(path: string, content: string, encoding: string, callback: CompleteCallback, context: any);
4545
}
4646

47-
export namespace Http {
47+
export module Http {
4848
export class KeyValuePair {
4949
public key: string;
5050
public value: string;
@@ -277,7 +277,7 @@
277277
public setPassThroughParent(value: boolean): void;
278278
}
279279

280-
export namespace LayoutBase {
280+
export module LayoutBase {
281281
export class WindowInsetListener {
282282
public constructor(implementation: {
283283
onApplyWindowInsets(param0: java.nio.ByteBuffer): void;
@@ -720,9 +720,9 @@
720720
}
721721
}
722722

723-
declare namespace org {
724-
export namespace nativescript {
725-
export namespace widgets {
723+
declare module org {
724+
export module nativescript {
725+
export module widgets {
726726
export class FileHelper {
727727
public static class: java.lang.Class<org.nativescript.widgets.FileHelper>;
728728
public appendSync(param0: globalAndroid.content.Context, param1: androidNative.Array<number>, param2: org.nativescript.widgets.FileHelper.Callback): void;
@@ -758,7 +758,7 @@ declare namespace org {
758758
public appendText(param0: globalAndroid.content.Context, param1: string, param2: string, param3: org.nativescript.widgets.FileHelper.Callback): void;
759759
public getLastModified(): number;
760760
}
761-
export namespace FileHelper {
761+
export module FileHelper {
762762
export class Callback {
763763
public static class: java.lang.Class<org.nativescript.widgets.FileHelper.Callback>;
764764
/**
@@ -777,9 +777,9 @@ declare namespace org {
777777
}
778778
}
779779

780-
declare namespace org {
781-
export namespace nativescript {
782-
export namespace widgets {
780+
declare module org {
781+
export module nativescript {
782+
export module widgets {
783783
export class Utils {
784784
public static class: java.lang.Class<org.nativescript.widgets.Utils>;
785785
public static getBitmapFromDrawable(param0: globalAndroid.graphics.drawable.Drawable): globalAndroid.graphics.Bitmap;
@@ -802,7 +802,7 @@ declare namespace org {
802802
public static ignoreEdgeToEdgeOnOlderDevices: boolean;
803803
public constructor();
804804
}
805-
export namespace Utils {
805+
export module Utils {
806806
export class AsyncImageCallback {
807807
public static class: java.lang.Class<org.nativescript.widgets.Utils.AsyncImageCallback>;
808808
/**

‎packages/types-ios/src/lib/ios/interop.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Provides API for working with native C types, pointers, pointer arithmetic and memory.
33
*/
4-
declare namespace interop {
4+
declare module interop {
55

66
/**
77
* A type that is used to represent a void*.

‎packages/types-minimal/src/lib/android/api/android-declarations.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interface ArrayConstructor {
1818
create(type: any, count: number): any;
1919
}
2020

21-
declare namespace androidNative { export class Array<T> { constructor(); length: number; [index: number]: T; } }
21+
declare module androidNative { export class Array<T> { constructor(); length: number; [index: number]: T; } }
2222

2323
import globalAndroid = android;
2424

‎packages/types-minimal/src/lib/ios/interop.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Provides API for working with native C types, pointers, pointer arithmetic and memory.
33
*/
4-
declare namespace interop {
4+
declare module interop {
55

66
/**
77
* A type that is used to represent a void*.

0 commit comments

Comments
 (0)