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:
Martin Yankov
2019-11-28 13:36:34 +02:00
committed by Alexander Vakrilov
parent 5b647bd809
commit 0ffc790d82
72 changed files with 1958 additions and 1307 deletions

View File

@@ -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 = {};

View File

@@ -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);

View File

@@ -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();