Skip to content

New typings for fs-cson module - #21375

Merged
2 commits merged into
DefinitelyTyped:masterfrom
dex4er:fs-cson
Nov 10, 2017
Merged

2 commits merged into
DefinitelyTyped:masterfrom
dex4er:fs-cson

Conversation

@dex4er

@dex4er dex4er commented Nov 9, 2017

Copy link
Copy Markdown
Contributor

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

Select one of these and delete the others:

If adding a new definition:

  • The package does not provide its own types, and you can not add them.
  • If this is for an NPM package, match the name. If not, do not conflict with the name of an NPM package.
  • Create it with dts-gen --dt, not by basing it on an existing project.
  • tslint.json should be present, and tsconfig.json should have noImplicitAny, noImplicitThis, strictNullChecks, and strictFunctionTypes set to true.

@dt-bot

dt-bot commented Nov 9, 2017

Copy link
Copy Markdown
Member

@RyanCavanaugh RyanCavanaugh added New Definition This PR creates a new definition package. The Travis CI build failed labels Nov 9, 2017
@RyanCavanaugh

Copy link
Copy Markdown
Member

@dex4er Please fix the failures indicated in the Travis CI log.

Comment thread types/fs-cson/index.d.ts Outdated

export function readFile(filePath: string, done: (err: Error | null, result: any) => void): void;
export function readFileSync(filePath: string): any;
export function register(): any;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this returns void?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure. register() is defined here https://github.com/charlierudolph/fs-cson/blob/ea5420ec9001f6abd4f279d83ae2f38187100335/src/register.coffee#L5

and

> require('fs-cson').register()
{}

and it looks like returns what is returned by readFileSync. But I would agree that doesn't make any sense to expect any result from register function so I'm going to change it to void.

@ghost

ghost commented Nov 10, 2017

Copy link
Copy Markdown

Thanks!

@ghost
ghost merged commit 0a4418d into DefinitelyTyped:master Nov 10, 2017
luho383 added a commit to luho383/DefinitelyTyped that referenced this pull request Nov 11, 2017
* master: (356 commits)
  vuex-i18n: Fixes from code review (DefinitelyTyped#21418)
  resourcejs: Increase TypeScript version to match mongoose
  leaflet.polylinemeasure: Add TypeScript version
  updated TS version to 2.3 for �abel-webpack-plugin.
  crlf -> lf
  Make hljs a proper UMD module
  Use only major.minor for `highlight.js`.
  atom: fix several incorrect definitions.
  Update index.d.ts
  Node: `path.format` input properties are optional (DefinitelyTyped#21003)
  New typings for fs-cson module (DefinitelyTyped#21375)
  New typings for bunyan-format module (DefinitelyTyped#21376)
  [chart.js] Add 'pie' to ChartType
  Update highlight.js version to latest (9.12.0)
  Fix type for highlight.js continuation argument
  Fixed errors after dts-gen
  New typings for module wtfnode
  fix getMeasure result fix: IGenericDimensionLayout
  change return Value of getDimension() from Dimension Object
  puppeteer: setCookie should be less strict
  ...

# Conflicts:
#	types/three/test/css3d/css3d_sprites.ts
#	types/three/test/webgl/webgl_materials.ts
@dex4er
dex4er deleted the fs-cson branch November 12, 2017 15:37
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Definition This PR creates a new definition package.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants