Skip to content

create primitive to prevent one folder from importing from anotherΒ #63002

@ORESoftware

Description

@ORESoftware

πŸ” Search Terms

create primitive to prevent one folder from importing from another folder

when importing from a blacklisted folder it would represent a compile error

this would help a lot more people than you think, mostly for server/client interfacing

βœ… Viability Checklist

⭐ Suggestion

configuration in tsconfig.json that prevents one folder from importing another

in tsconfig.json

[
{
   folder: '',
   cannotImport: [],
   canOnlyImport: []
}
]

it could also be at the file level, but folder level sufficient

πŸ“ƒ Motivating Example

configuration in tsconfig.json that prevents one folder from importing another

in tsconfig.json

[
{
   folder: '',
   cannotImport: [],
   canOnlyImport: []
}
]

it could also be at the file level, but folder level sufficient

πŸ’» Use Cases

  1. What do you want to use this for?
  2. What shortcomings exist with current approaches?
  3. What workarounds are you using in the meantime?

Metadata

Metadata

Assignees

No one assigned

    Labels

    SuggestionAn idea for TypeScriptToo ComplexAn issue which adding support for may be too complex for the value it adds

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions