mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: cleanup
This commit is contained in:
@@ -17,4 +17,8 @@ export class ModuleNameResolver {
|
||||
export function resolveModuleName(path: string, ext: string): string;
|
||||
export function clearCache(): void;
|
||||
|
||||
/**
|
||||
* Used to set a global singular instance of ModuleNameResolver
|
||||
* @param resolver instance
|
||||
*/
|
||||
export function _setResolver(resolver: ModuleNameResolver);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { ModuleNameResolver as ModuleNameResolverDefinition } from './';
|
||||
import { screen, Device } from '../platform';
|
||||
import * as appCommonModule from '../application/application-common';
|
||||
import { PlatformContext, findMatch, stripQualifiers } from './qualifier-matcher';
|
||||
@@ -9,7 +8,7 @@ export { PlatformContext } from './qualifier-matcher';
|
||||
|
||||
export type ModuleListProvider = () => string[];
|
||||
|
||||
export class ModuleNameResolver implements ModuleNameResolverDefinition {
|
||||
export class ModuleNameResolver {
|
||||
private _cache = {};
|
||||
|
||||
constructor(private context: PlatformContext, private moduleListProvider: ModuleListProvider = global.getRegisteredModules) {}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
* Provides ModuleNameResolver class used for loading files based on device capabilities.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Used with qualifier matchers and module resolution
|
||||
*/
|
||||
export interface PlatformContext {
|
||||
width: number;
|
||||
height: number;
|
||||
|
||||
@@ -3,6 +3,9 @@ const MIN_W: string = 'minW';
|
||||
const MIN_H: string = 'minH';
|
||||
const PRIORITY_STEP = 10000;
|
||||
|
||||
/**
|
||||
* Used with qualifier matchers and module resolution
|
||||
*/
|
||||
export interface PlatformContext {
|
||||
width: number;
|
||||
height: number;
|
||||
|
||||
Reference in New Issue
Block a user