Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

Fix FunctionDeclaration spec: Id may be null #503

Merged
merged 2 commits into from May 10, 2017
Merged

Fix FunctionDeclaration spec: Id may be null #503

merged 2 commits into from May 10, 2017

Conversation

ghost
Copy link

@ghost ghost commented May 2, 2017

Q A
Bug fix? no
Breaking change? no
New feature? no
Deprecations? no
Spec compliancy? yes
Tests added/pass? Tests pass
Fixed tickets #502
License MIT

FunctionDeclaration may have a null id in export default function() {}. Updated its spec and type declaration.

@hzoo
Copy link
Member

hzoo commented May 2, 2017

I was going to go with

ExportDefaultDeclaration

interface OptFunctionDeclaration <: FunctionDeclaration {
    id: Identifier | null;
}

interface OptClassDeclaration <: ClassDeclaration {
    id: Identifier | null;
}

interface ExportDefaultDeclaration <: ModuleDeclaration {
    type: "ExportDefaultDeclaration";
    declaration: OptFunctionDeclaration | OptClassDeclaration | Expression;
}

like in estree/estree#98 (comment) if that makes sense?

@codecov
Copy link

codecov bot commented May 2, 2017

Codecov Report

Merging #503 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #503   +/-   ##
=======================================
  Coverage   98.26%   98.26%           
=======================================
  Files          22       22           
  Lines        3524     3524           
  Branches      977      977           
=======================================
  Hits         3463     3463           
  Misses         22       22           
  Partials       39       39
Flag Coverage Δ
#babel 80.98% <ø> (ø) ⬆️
#babylon 97.1% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d33c827...8433cb9. Read the comment docs.

@danez danez merged commit 1f113fd into babel:master May 10, 2017
@ghost ghost deleted the function-declaration-spec branch May 10, 2017 21:44
@hzoo hzoo added the Tag: Docs label May 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants