You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not sure if I am mistaken, but I have no import-syntax working for properties-reader (using TypeScript).
Documentation:
const propertiesReader = require("properties-reader"); // works fine
const properties = propertiesReader("path");
Trying to use modern import-syntax does not work for me.
import * as propertiesReader from "properties-reader"); // does not work
import {PropertiesReader} from "properties-reader"; // does not work
import {propertiesReader} from "properties-reader"; // does not work
import {PropertiesReader} from "properties-reader/src/properties-reader"; // does not work
[...]
This might not be an issue but just me not understanding why this is not working. I have looked up require to import converters, which would convert the require-statement into one of the import statements above.
I think it is not working because of the unusual directory-structure of npm-properties-reader. Usually an npm module has an index.js file directly in the directory folder exporting all other visible modules.
I think it would be great if properties-reader import-syntax would be fair to conventions.
The text was updated successfully, but these errors were encountered:
Hi, at the moment this library isn't bundled with typescript types, but there are types available on npm as @types/properties-reader which are up to date with the current state of the library.
To import the library you would need to use the default import, eg:
importpropertiesReader,{AppenderOptions, ... any othertypeshere ... }from'properties-reader'`;
Hello,
I am not sure if I am mistaken, but I have no import-syntax working for properties-reader (using TypeScript).
Documentation:
const propertiesReader = require("properties-reader"); // works fine
const properties = propertiesReader("path");
Trying to use modern import-syntax does not work for me.
import * as propertiesReader from "properties-reader"); // does not work
import {PropertiesReader} from "properties-reader"; // does not work
import {propertiesReader} from "properties-reader"; // does not work
import {PropertiesReader} from "properties-reader/src/properties-reader"; // does not work
[...]
This might not be an issue but just me not understanding why this is not working. I have looked up require to import converters, which would convert the require-statement into one of the import statements above.
I think it is not working because of the unusual directory-structure of npm-properties-reader. Usually an npm module has an index.js file directly in the directory folder exporting all other visible modules.
I think it would be great if properties-reader import-syntax would be fair to conventions.
The text was updated successfully, but these errors were encountered: