mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: remove critical circular dependencies (#8114)
* chore: remove critical circular dependencies * chore: fix tslint errors * chore: remove platform specific types from interfaces * chore: update unit tests polyfills * fix: incorrect null check * chore: update api.md file * test: improve test case * chore: apply comments * test: avoid page style leaks in tests
This commit is contained in:
committed by
Alexander Vakrilov
parent
5b647bd809
commit
0ffc790d82
@@ -1,4 +1,4 @@
|
||||
import { PlatformContext, FileNameResolver as FileNameResolverDefinition } from "../file-name-resolver";
|
||||
import { PlatformContext, FileNameResolver as FileNameResolverDefinition } from ".";
|
||||
import { screen, device } from "../../platform";
|
||||
import { path as fsPath, Folder, File } from "../file-system";
|
||||
import * as trace from "../../trace";
|
||||
@@ -6,7 +6,6 @@ import * as appCommonModule from "../../application/application-common";
|
||||
|
||||
import { findMatch } from "../../module-name-resolver/qualifier-matcher/qualifier-matcher";
|
||||
|
||||
@Deprecated
|
||||
export class FileNameResolver implements FileNameResolverDefinition {
|
||||
private _context: PlatformContext;
|
||||
private _cache = {};
|
||||
|
||||
@@ -495,7 +495,7 @@ export class FileSystemAccess {
|
||||
|
||||
// TODO: This method is the same as in the iOS implementation.
|
||||
// Make it in a separate file / module so it can be reused from both implementations.
|
||||
private getFileExtension(path: string): string {
|
||||
public getFileExtension(path: string): string {
|
||||
const dotIndex = path.lastIndexOf(".");
|
||||
if (dotIndex && dotIndex >= 0 && dotIndex < path.length) {
|
||||
return path.substring(dotIndex);
|
||||
|
||||
@@ -395,7 +395,7 @@ export class FileSystemAccess {
|
||||
|
||||
// TODO: This method is the same as in the iOS implementation.
|
||||
// Make it in a separate file / module so it can be reused from both implementations.
|
||||
private getFileExtension(path: string): string {
|
||||
public getFileExtension(path: string): string {
|
||||
// TODO [For Panata]: The definitions currently specify "any" as a return value of this method
|
||||
//const nsString = Foundation.NSString.stringWithString(path);
|
||||
//const extension = nsString.pathExtension();
|
||||
|
||||
Reference in New Issue
Block a user